Configuration

The config.json is used to control global behavior across keywords,test scripts and setup.

Location
apps/frabot/config.json

JSON Structure

{
  "max_wait_time": 30,
  "min_wait_time": 5,
  "enable_grid": 0,
  "grid_url": "",
  "args": []
}

Field Descriptions

  • max_wait_time
    Maximum wait time (in seconds) to access the element .

  • min_wait_time
    Minimum wait time for shorter waits or quick retries.

  • enable_grid

    • 1 = Enable Selenium Grid execution

    • 0 = Run locally

  • grid_url
    Selenium Grid endpoint URL (only used if enable_grid = 1).

  • args
    List of browser arguments for launching Chrome (e.g., ["--headless", "--disable-gpu"]).


How to Use in Robot Framework

To access these values globally:

This allows Robot Framework to treat each field as a global variable.

Step 1: Import in .robot file

*** Settings ***
Variables    ../libraries/variables.py

Step 2: Use in Test Scripts

Wait Until Element Is Visible    id=navbar-search    ${config}[max_wait_time]

Run Keyword If    ${config}[enable_grid] == 1    Setup Selenium Grid  ${config[grid_url]