GUI Test "Desired Capabilities" Options

Important: Capabilities objects have been replaced with Options in Selenium 4. You must create an Options object, set test requirements, and pass the object to the Driver constructor. See Upgrade to Selenium 4 for details.

To execute on the BlazeMeter cloud directly from your IDE, BlazeMeter has custom capabilities that you pass into a Webdriver session through a Desired Capabilities class. You can enable and configure various optional settings by referring to them via this dictionary.

BlazeMeter supports Selenium 4.1.3 and 4.1.4 and higher. For 4.1.3, a desired_capabilities{} dictionary is required for a Python Selenium script; a DesiredCapabilities() Java object is required for a Java Selenium script. For 4.1.4 or higher, a browser_options{} dictionary is required for a Python Selenium script; and a bzmOptions HashMap for a Java Selenium script.

For guides on how to first modify your script, please refer to Creating a GUI Test from a Python IDE or Creating a GUI Test from a Java IDE.

This article serves as a reference for all options available, which include the following:

  • platformName - which platform to use (windows/linux).
  • browserName - which browser the test will run on. Accepted values are "chrome", "firefox", "MicrosoftEdge" and "safari".

    Note: Apart from "MicrosoftEdge", remember to input all other browser names in lowercase.

  • browserVersion - what specific version of the browser to use.
  • blazemeter.projectId - if you want to add your test to some existing BlazeMeter project. If the ID is wrong, the test will not launch, and you'll get an error.
  • blazemeter.buildId - if you run tests in parallel in several browser sessions at a time (several Webdriver instances in parallel), use this ID to group sessions in the report. If the buildId is not provided in the Desired Capabilities, then a unique buildId is recorded for each session, and every session appears in a separate report. Set the buildID in each script to a string of your choice (for example, a timestamp in milliseconds) to have sessions with the same buildId appear in the same BlazeMeter report.
  • blazemeter.testId - if you want to attach your report to an existing test, add its Test ID. If the ID is wrong, the test will not launch, and you'll get an error. (Remember: the chosen test must be a Functional GUI Test.)
  • blazemeter.testName - if you want to attach your report to an existing test, add its testName. If the name does not exist, a new test is created. If the test name exists, but it's not a Functional GUI Test, the test will not launch, and you'll get an error.
  • blazemeter.reportName - you may name your report, which you'll then see in the Reports drop-down menu and on the dashboard.
  • blazemeter.sessionName - you may name the session, which will then appear in the drop-down menu in the upper-right corner of the test report.
  • blazemeter.sessionTimeout - default value is 300 seconds. If you expect a gap between commands in your test is more than 300 seconds, you may need to increase this value (to a maximum 1200 seconds).
  • blazemeter.locationId - you may use the Location ID (aka Location Name) of one of the available BlazeMeter locations or your own private location.

    Note: To see the list of available locations, create a new GUI Functional Test in the UI, upload a YAML file, and review the options available that appear when you click the "Select test location" drop-down menu.

    test location selection menu
  • blazemeter.videoEnabled - whether you want video enabled on your test report (true or false).

Below is list of selenium capabilities that we set by default (we will use your value in case you will pass same capability from your script):

  • acceptInsecureCerts - to allow testing apps with self signed (untrusted) certificates.

To see all available browsers, use the API https://a.blazemeter.com/api/v4/grid/capabilities. The API outputs only apply to the available browserName and browserVersion options.