{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/boyka-config.json",
  "additionalProperties": true,
  "definitions": {
    "caps": {
      "type": "object",
      "description": "Capabilities object where you can add any capability based on the Cloud platform supported or Grid supported capabilities",
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      }
    },
    "args": {
      "type": "object",
      "description": "Arguments object where you can add any arguments",
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      }
    },
    "ApplicationType": {
      "description": "Type of Mobile Application",
      "enum": ["HYBRID", "NATIVE", "WEB"],
      "default": "NATIVE",
      "type": "string"
    },
    "AutomationType": {
      "description": "Target Appium Driver",
      "enum": ["UI_AUTOMATOR", "XCUI"],
      "type": "string"
    },
    "Browser": {
      "description": "Target Web Browser",
      "enum": ["CHROME", "EDGE", "FIREFOX", "NONE", "REMOTE", "SAFARI"],
      "type": "string"
    },
    "DeviceType": {
      "description": "Type of Target Device",
      "enum": ["CLOUD", "VIRTUAL"],
      "type": "string"
    },
    "LogLevel": {
      "description": "Log level used to capture the Appium server logging",
      "enum": [
        "DEBUG",
        "DEBUG_DEBUG",
        "DEBUG_ERROR",
        "DEBUG_INFO",
        "DEBUG_WARN",
        "ERROR",
        "ERROR_DEBUG",
        "ERROR_ERROR",
        "ERROR_INFO",
        "ERROR_WARN",
        "INFO",
        "INFO_DEBUG",
        "INFO_ERROR",
        "INFO_INFO",
        "INFO_WARN",
        "WARN",
        "WARN_DEBUG",
        "WARN_ERROR",
        "WARN_INFO",
        "WARN_WARN"
      ],
      "type": "string"
    },
    "OS": {
      "description": "Target Mobile OS",
      "enum": ["ANDROID", "IOS"],
      "type": "string"
    },
    "PageLoadStrategy": {
      "description": "Page Load strategy for Web application",
      "enum": ["NONE", "EAGER", "NORMAL"],
      "type": "string"
    },
    "Protocol": {
      "description": "Protocol for Target server",
      "enum": ["HTTP", "HTTPS"],
      "type": "string"
    },
    "Speed": {
      "description": "Swiping speed for Mobile devices",
      "default": "NORMAL",
      "enum": ["FAST", "NORMAL", "SLOW"],
      "type": "string"
    },
    "TargetProviders": {
      "description": "Target Cloud providers",
      "enum": [
        "BROWSER_STACK",
        "LAMBDA_TEST_MOBILE",
        "LAMBDA_TEST_WEB",
        "LOCAL"
      ],
      "type": "string"
    },
    "VideoQuality": {
      "description": "Video recording quality",
      "enum": ["LOW", "MEDIUM", "HIGH", "PHOTO"],
      "type": "string"
    },
    "WindowResizeType": {
      "description": "Window resize type for Web Browser",
      "enum": ["CUSTOM", "FULL_SCREEN", "MAXIMIZED", "MINIMIZED", "NORMAL"],
      "type": "string"
    },
    "PermissionDecision": {
      "description": "Permission decision for iOS devices",
      "enum": [
        "ALWAYS",
        "CRITICAL",
        "IN_USE",
        "LIMITED",
        "NEVER",
        "NO",
        "UNSET",
        "YES"
      ],
      "type": "string"
    },
    "Permissions": {
      "description": "Permissions for iOS devices",
      "enum": [
        "CALENDAR",
        "CAMERA",
        "CONTACTS",
        "HEALTH",
        "HOME_KIT",
        "LOCATION",
        "MEDIA_LIBRARY",
        "MICROPHONE",
        "MOTION",
        "NOTIFICATIONS",
        "REMINDERS",
        "SIRI",
        "SPEECH",
        "USER_TRACKING"
      ],
      "type": "string"
    },
    "TestDataSource": {
      "description": "Test data source for test data driven testing",
      "enum": ["EXCEL"],
      "type": "string"
    }
  },
  "properties": {
    "api": {
      "description": "Collection of API configurations",
      "additionalProperties": {
        "description": "API Configuration properties",
        "properties": {
          "base_path": {
            "description": "Base path of the API endpoint",
            "type": "string"
          },
          "base_uri": {
            "description": "Base URI of the API endpoint",
            "type": "string"
          },
          "timeout": {
            "description": "API Timeout settings",
            "properties": {
              "connection_timeout": {
                "description": "API request connection timeout (in seconds)",
                "default": 5,
                "type": "number"
              },
              "read_timeout": {
                "description": "API request read timeout (in seconds)",
                "default": 5,
                "type": "number"
              },
              "write_timeout": {
                "description": "API request write timeout (in seconds)",
                "default": 5,
                "type": "number"
              }
            },
            "type": "object"
          },
          "logging": {
            "description": "Logging related settings",
            "properties": {
              "enable": {
                "description": "If false, logging of API request and response will not be captured, default is set to true",
                "type": "boolean"
              },
              "request": {
                "description": "Log API request related details",
                "type": "boolean"
              },
              "response": {
                "description": "Log API response related details",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "port": {
            "description": "Port number of API endpoint",
            "type": "number"
          },
          "schema_path": {
            "description": "API response schema files parent directory path",
            "type": "string"
          },
          "validate_ssl": {
            "description": "If set to false, SSL handshake validation will be skipped, set to true by default",
            "default": true,
            "type": "boolean"
          },
          "verify_host_name": {
            "description": "If set to false, Host name verification will be skipped, set to true by default",
            "default": true,
            "type": "boolean"
          }
        },
        "required": ["base_uri"],
        "type": "object"
      },
      "type": "object"
    },
    "listeners_package": {
      "description": "Package name where all the Boyka listener implementations are placed",
      "type": "string"
    },
    "ui": {
      "description": "UI Configurations for Web and Mobile",
      "properties": {
        "delay": {
          "description": "UI interaction delay settings",
          "properties": {
            "before_click": {
              "description": "Delay before clicking on an element (in ms)",
              "type": "number"
            },
            "before_mouse_move": {
              "description": "Delay before moving of mouse (in ms)",
              "type": "number"
            },
            "before_swipe": {
              "description": "Delay before swiping on the device screen or inside an element (in ms)",
              "default": 500,
              "type": "number"
            },
            "before_tap": {
              "description": "Delay before tapping on an element (in ms)",
              "type": "number"
            },
            "before_typing": {
              "description": "Delay before typing any text in an element (in ms)",
              "type": "number"
            }
          },
          "type": "object"
        },
        "logging": {
          "description": "UI logging related settings",
          "properties": {
            "enable": {
              "description": "If true, any log files generated by Selenium or Appium would be saved",
              "default": true,
              "type": "boolean"
            },
            "exclude_logs": {
              "description": "List of type of logs which you want to exclude from",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "path": {
              "description": "Path where the logs should be saved",
              "default": "./logs",
              "type": "string"
            }
          },
          "type": "object"
        },
        "mobile": {
          "description": "Mobile related settings",
          "additionalProperties": {
            "properties": {
              "device": {
                "description": "Mobile device related settings",
                "properties": {
                  "accept_alerts": {
                    "description": "Automatically accepts alerts",
                    "default": true,
                    "type": "boolean"
                  },
                  "adb_timeout": {
                    "description": "ADB timeout (in seconds)",
                    "default": 30,
                    "type": "number"
                  },
                  "application": {
                    "description": "Application related settings",
                    "properties": {
                      "base_url": {
                        "description": "Base URL of Web application which will be used to automatically navigate it to",
                        "type": "string"
                      },
                      "browser": {
                        "$ref": "#/definitions/Browser"
                      },
                      "bundle_id": {
                        "description": "iOS Bundle ID",
                        "type": "string"
                      },
                      "chrome_driver_port": {
                        "description": "Chrome driver port",
                        "type": "number"
                      },
                      "external": {
                        "description": "Set to true, if the application path is not under `src/test/resources`",
                        "default": false,
                        "type": "boolean"
                      },
                      "install_timeout": {
                        "description": "Timeout for waiting until Application is installed on the device (in seconds)",
                        "default": 30,
                        "type": "number"
                      },
                      "path": {
                        "description": "Path of the application under `src/test/resources` if `external` property is set to false, or Application URL for Cloud platform",
                        "type": "string"
                      },
                      "type": {
                        "$ref": "#/definitions/ApplicationType"
                      },
                      "wait_activity": {
                        "description": "Activity name to wait until it is loaded",
                        "type": "string"
                      },
                      "wait_timeout": {
                        "description": "Wait timeout to wait until a package or activity is loaded (in seconds)",
                        "default": 30,
                        "type": "number"
                      }
                    },
                    "type": "object"
                  },
                  "auto_grant_permissions": {
                    "description": "Automatically grant permissions for Android devices",
                    "default": false,
                    "type": "boolean"
                  },
                  "capabilities": {
                    "$ref": "#/definitions/caps"
                  },
                  "clear_files": {
                    "description": "Set to true to clean up any cached files before starting the test session",
                    "default": true,
                    "type": "boolean"
                  },
                  "clear_logs": {
                    "description": "Set to true to clean up any old logs from the device before starting the test session",
                    "default": true,
                    "type": "boolean"
                  },
                  "command_timeout": {
                    "description": "Timeout for new command execution (in seconds)",
                    "default": 60,
                    "type": "number"
                  },
                  "full_reset": {
                    "description": "Set to true to perform full reset of the target device. This will not delete any important files, it will only clear any files or logs which was created by earlier test executions",
                    "default": true,
                    "type": "boolean"
                  },
                  "ignore_unimportant_views": {
                    "description": "Set to true to reduce the element hierarchies to only those elements which are visible to the user",
                    "default": true,
                    "type": "boolean"
                  },
                  "name": {
                    "description": "Target Device name",
                    "type": "string"
                  },
                  "no_reset": {
                    "description": "Set to true to avoid Appium to reset previous test executions files or logs",
                    "default": false,
                    "type": "boolean"
                  },
                  "os": {
                    "$ref": "#/definitions/OS"
                  },
                  "permissions": {
                    "description": "Permissions for iOS devices",
                    "propertyNames": {
                      "$ref": "#/definitions/Permissions"
                    },
                    "additionalProperties": {
                      "$ref": "#/definitions/PermissionDecision"
                    },
                    "type": "object"
                  },
                  "server_install_timeout": {
                    "description": "Timeout to wait until Appium server application is installed on the device",
                    "default": 30,
                    "type": "number"
                  },
                  "server_launch_timeout": {
                    "description": "Timeout to wait until Appium server application is launched on the device",
                    "default": 30,
                    "type": "number"
                  },
                  "swipe": {
                    "description": "Swipe related settings",
                    "properties": {
                      "distance": {
                        "description": "Distance of finger which will be moved from the starting position to the ending position",
                        "maximum": 100,
                        "minimum": 1,
                        "default": 75,
                        "type": "number"
                      },
                      "max_swipe_until_found": {
                        "description": "Maximum number of swipes till the element is visible",
                        "minimum": 1,
                        "maximum": 100,
                        "default": 5,
                        "type": "number"
                      },
                      "speed": {
                        "$ref": "#/definitions/Speed"
                      }
                    },
                    "type": "object"
                  },
                  "system_port": {
                    "description": "Android System port number",
                    "default": 8200,
                    "type": "number"
                  },
                  "type": {
                    "$ref": "#/definitions/DeviceType"
                  },
                  "typing_speed": {
                    "description": "Typing speed while entering the text in the input element. Only for iOS",
                    "default": 60,
                    "type": "number"
                  },
                  "unique_id": {
                    "description": "Device unique ID",
                    "type": "string"
                  },
                  "version": {
                    "description": "Device OS version",
                    "type": "string"
                  },
                  "video": {
                    "description": "Video recording related settings",
                    "properties": {
                      "android": {
                        "description": "Android video recording related settings",
                        "properties": {
                          "bit_rate": {
                            "description": "Bit rate of the video, higher value results in better quality of video. Value will be internally multiplied by 1000000",
                            "default": 4,
                            "minimum": 1,
                            "maximum": 25,
                            "type": "number"
                          }
                        },
                        "type": "object"
                      },
                      "enabled": {
                        "description": "Set it to true to enable video recording of the test",
                        "type": "boolean"
                      },
                      "ios": {
                        "description": "iOS video recording related settings",
                        "properties": {
                          "codec": {
                            "description": "Codec type of the video. The type should be one of the result for the command `ffmpeg -codecs`",
                            "default": "mpeg4",
                            "type": "string"
                          },
                          "fps": {
                            "description": "Frames per second",
                            "default": 10,
                            "minimum": 1,
                            "maximum": 60,
                            "type": "number"
                          },
                          "quality": {
                            "$ref": "#/definitions/VideoQuality"
                          }
                        },
                        "type": "object"
                      },
                      "path": {
                        "description": "Path where the video to be saved",
                        "default": "./videos",
                        "type": "string"
                      },
                      "prefix": {
                        "description": "Prefix of the video file name",
                        "default": "VID",
                        "type": "string"
                      },
                      "size": {
                        "description": "Video resolution size",
                        "type": "string"
                      },
                      "time_limit": {
                        "description": "Time limit of the video (in seconds)",
                        "minimum": 10,
                        "maximum": 1800,
                        "type": "number"
                      }
                    },
                    "type": "object"
                  },
                  "virtual_device": {
                    "description": "Virtual device related settings",
                    "properties": {
                      "connect_keyboard": {
                        "description": "Set to true if you want to connect hardware device. Only for iOS devices",
                        "default": true,
                        "type": "boolean"
                      },
                      "headless": {
                        "description": "Set to true if you want to run the test in headless mode",
                        "default": false,
                        "type": "boolean"
                      },
                      "launch_timeout": {
                        "description": "Virtual device launch timeout (in seconds)",
                        "default": 120,
                        "type": "number"
                      },
                      "name": {
                        "description": "Name of the virtual device",
                        "type": "string"
                      },
                      "ready_timeout": {
                        "description": "AVD ready timeout. Only for Android",
                        "default": 60,
                        "type": "number"
                      }
                    },
                    "type": "object"
                  },
                  "wda": {
                    "description": "iOS WebDriverAgent related settings",
                    "properties": {
                      "connection_timeout": {
                        "description": "WDA connection timeout (in seconds)",
                        "default": 60,
                        "minimum": 1,
                        "maximum": 900,
                        "type": "number"
                      },
                      "launch_timeout": {
                        "description": "WDA launch timeout (in seconds)",
                        "default": 60,
                        "minimum": 1,
                        "maximum": 900,
                        "type": "number"
                      },
                      "local_port": {
                        "description": "Port on which WDA is running",
                        "default": 8100,
                        "type": "number"
                      },
                      "signing_id": {
                        "description": "XCode signing ID",
                        "type": "string"
                      },
                      "startup_retries": {
                        "description": "WDA startup retries",
                        "default": 2,
                        "minimum": 1,
                        "maximum": 10,
                        "type": "number"
                      },
                      "startup_retry_interval": {
                        "description": "WDA startup retry interval",
                        "default": 10,
                        "minimum": 1,
                        "maximum": 300,
                        "type": "number"
                      },
                      "team_id": {
                        "description": "XCode Team or Organization ID",
                        "type": "string"
                      },
                      "update_bundle_id": {
                        "description": "Bundle ID to update WDA before building and launching it",
                        "type": "string"
                      },
                      "use_new": {
                        "description": "Set to true, to use new WDA on every run",
                        "default": false,
                        "type": "boolean"
                      },
                      "use_prebuilt": {
                        "description": "Set to true, if you want to use the existing prebuilt WDA instance",
                        "default": false,
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  },
                  "web_view_connect_retries": {
                    "description": "Number of retries to connect to the web view",
                    "default": 3,
                    "minimum": 1,
                    "maximum": 10,
                    "type": "number"
                  },
                  "web_view_connect_timeout": {
                    "description": "Timeout to wait for web view to connect (in seconds)",
                    "default": 60,
                    "minimum": 1,
                    "maximum": 300,
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "server": {
                "description": "Appium server related settings",
                "properties": {
                  "allow_cors": {
                    "description": "Set to true to allow cors",
                    "type": "boolean"
                  },
                  "allow_insecure": {
                    "description": "Set list of insecure features which you want to enable",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "appium_path": {
                    "description": "Appium executable path",
                    "type": "string"
                  },
                  "base_path": {
                    "description": "Appium server's base path, example `/wd/hub`",
                    "type": "string"
                  },
                  "callback_address": {
                    "description": "Callback IP address",
                    "type": "string"
                  },
                  "callback_port": {
                    "description": "Callback Port number",
                    "type": "number"
                  },
                  "config_path": {
                    "description": "Appium config path",
                    "type": "string"
                  },
                  "deny_insecure": {
                    "description": "List of insecure features which you want to deny",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "driver": {
                    "$ref": "#/definitions/AutomationType"
                  },
                  "external": {
                    "description": "Set to true, if you have Appium server already running",
                    "default": false,
                    "type": "boolean"
                  },
                  "external_config": {
                    "description": "Set to true, if the Appium config file is not there in the projects root directory",
                    "default": false,
                    "type": "boolean"
                  },
                  "host": {
                    "description": "Appium server's IP address",
                    "type": "string"
                  },
                  "keep_alive_timeout": {
                    "description": "Timeout to keep the Appium server running",
                    "type": "number"
                  },
                  "logging": {
                    "description": "Appium server's logging related settings",
                    "properties": {
                      "debug_spacing": {
                        "description": "Adds extra spaces to logs for ease to view",
                        "default": false,
                        "type": "boolean"
                      },
                      "level": {
                        "$ref": "#/definitions/LogLevel"
                      },
                      "local_timezone": {
                        "description": "Set to true to use local timezone",
                        "default": false,
                        "type": "boolean"
                      },
                      "timestamp": {
                        "description": "Set to true to display timestamps in the logs",
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  },
                  "node_path": {
                    "description": "Node JS executable path",
                    "type": "string"
                  },
                  "other_args": {
                    "$ref": "#/definitions/args"
                  },
                  "password": {
                    "description": "Your password for Cloud platform. You can also use environment variables in `${env:ENV_VAR_NAME}` format",
                    "type": "string"
                  },
                  "plugins": {
                    "description": "List of Appium plugin names which you want to activate",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "port": {
                    "description": "Port on which Appium Server will run",
                    "type": "number"
                  },
                  "protocol": {
                    "$ref": "#/definitions/Protocol"
                  },
                  "relaxed_security": {
                    "description": "Set to true, to allow relaxed security",
                    "default": false,
                    "type": "boolean"
                  },
                  "session_override": {
                    "description": "Set to true, to allow overriding the Appium session",
                    "type": "boolean"
                  },
                  "strict_capabilities": {
                    "description": "Set to true, to enforce strict capabilities",
                    "type": "boolean"
                  },
                  "target": {
                    "$ref": "#/definitions/TargetProviders"
                  },
                  "timeout": {
                    "description": "Appium server timeout (in seconds)",
                    "default": 30,
                    "minimum": 1,
                    "maximum": 900,
                    "type": "number"
                  },
                  "user_name": {
                    "description": "Your username of the Cloud platform. You can also use environment variables in `${env:ENV_VAR_NAME}` format",
                    "type": "string"
                  },
                  "webhook": {
                    "description": "Webhook URL to which you want to send the Appium server logs to",
                    "type": "string"
                  }
                },
                "type": "object",
                "required": ["driver"]
              }
            },
            "required": ["server", "device"],
            "type": "object"
          },
          "type": "object"
        },
        "screenshot": {
          "description": "UI screenshot related settings",
          "properties": {
            "enabled": {
              "description": "Set to true to enable screenshots",
              "default": false,
              "type": "boolean"
            },
            "extension": {
              "description": "Screenshot file extension",
              "default": "png",
              "type": "string"
            },
            "path": {
              "description": "Path where the screenshots will be saved",
              "default": "./screenshots",
              "type": "string"
            },
            "prefix": {
              "description": "Prefix of the screenshot file name",
              "default": "SCR",
              "type": "string"
            }
          },
          "type": "object"
        },
        "timeout": {
          "description": "UI timeout related settings",
          "properties": {
            "explicit_wait": {
              "description": "Explicit wait for the element to wait for a particular condition to succeed (in seconds)",
              "default": 10,
              "maximum": 900,
              "type": "number"
            },
            "highlight_delay": {
              "description": "Delay while Highlighting the element (in ms)",
              "default": 100,
              "maximum": 90000,
              "type": "number"
            },
            "implicit_wait": {
              "description": "Implicit wait for Appium to find the element (in seconds)",
              "default": 1,
              "maximum": 300,
              "type": "number"
            },
            "page_load_timeout": {
              "description": "Page load timeout (in seconds)",
              "default": 30,
              "maximum": 300,
              "type": "number"
            },
            "script_timeout": {
              "description": "Script load timeout (in seconds)",
              "default": 10,
              "maximum": 300,
              "type": "number"
            }
          },
          "type": "object"
        },
        "web": {
          "description": "Web related settings",
          "additionalProperties": {
            "properties": {
              "base_url": {
                "description": "Base URL to which you want to navigate automatically when the Web session is started",
                "type": "string"
              },
              "browser": {
                "$ref": "#/definitions/Browser"
              },
              "browser_options": {
                "description": "List of Browser driver options",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "capabilities": {
                "$ref": "#/definitions/caps"
              },
              "custom_size": {
                "description": "Custom size when Resize is set as `CUSTOM`",
                "properties": {
                  "height": {
                    "description": "Height of the Browser window",
                    "type": "number"
                  },
                  "width": {
                    "description": "Width of the Browser window",
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "experimental_options": {
                "description": "Map of experimental options",
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "object"
                    }
                  ]
                },
                "type": "object"
              },
              "headless": {
                "description": "Set to true if you want to run the test in headless mode",
                "default": true,
                "type": "boolean"
              },
              "highlight": {
                "description": "Set to true if you want to see the element interactions being highlighted",
                "default": false,
                "type": "boolean"
              },
              "host": {
                "description": "Host IP address, if not provided, Target Host will be used",
                "type": "string"
              },
              "page_load_strategy": {
                "$ref": "#/definitions/PageLoadStrategy"
              },
              "password": {
                "description": "Your cloud platform password. You can also use environment variables in `${env:ENV_VAR_NAME}` format",
                "type": "string"
              },
              "platform": {
                "description": "Platform on which the Web browser will be launched",
                "type": "string"
              },
              "port": {
                "description": "Port number on which Selenium WebDriver will start the session",
                "type": "number"
              },
              "protocol": {
                "$ref": "#/definitions/Protocol"
              },
              "resize": {
                "$ref": "#/definitions/WindowResizeType"
              },
              "target": {
                "$ref": "#/definitions/TargetProviders"
              },
              "user_name": {
                "description": "Your cloud platform user name or key. You can also use environment variables in `${env:ENV_VAR_NAME}` format",
                "type": "string"
              },
              "version": {
                "description": "Browser version of the Browser will be launched",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "data": {
      "description": "Test Data related settings",
      "properties": {
        "extension": {
          "description": "Data file extension",
          "default": "xlsx",
          "type": "string"
        },
        "external": {
          "description": "Is data file external or not",
          "default": false,
          "type": "boolean"
        },
        "path": {
          "description": "Test data file path",
          "default": "test-data",
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/TestDataSource"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
