Steer remote browser

XBrowser WebDriver Modules are created by using Tosca XScan.

Right-click on a Module folder or use the dynamic menu Modules in Tosca Commander and select Scan->More->Web Driver. For further details on how to proceed, please see chapter "Scan via WebDriver".

XBrowser WebDriver controls can be steered as described in chapter "Steer XBrowser controls", however there are some restrictions. To view a list of restrictions, see our Tricentis Knowledge Base.

Execute TestCases on a remote machine

To execute a XBrowser TestCase on a remote machine, you have to set test configuration parameters on the level of the TestCase. Depending whether you want to execute a TestCase via WebDriver or on BrowserStack, different configurations are necessary.

Before you can execute a TestCase on a remote machine, you have first to open the website in your browser.

You can only use TBox Standard Modules which are machine independent (e.g. TBox Wait, TBox Set Buffer) in a remote execution. Machine dependent Standard Modules (e.g. TBox Start Program) are executed on the local machine.

Execute TestCase on BrowserStack

To execute an XBrowser TestCase on BrowserStack you have to create test configuration parameters on the level of the TestCase you want to execute.

To execute an XBrowser TestCase on BrowserStack, follow the steps below:

  1. Create the test configuration parameters Browser, BrowserVersion, HubAddress and OperatingSystemon the level of the TestCase you want to execute.

  2. In the Value column of the test configuration parameters, enter the according information:

    • HubAddress: enter BrowserStack to execute your TestCase on BrowserStack.

    • Browser: enter the browser on which you want to execute the TestCase.

    • BrowserVersion: enter the version of the browser on which you want to execute the TestCase.

    • OperatingSystem: enter the operating system on which you want to execute the TestCase.

Specifying test configuration parameters for execution on BrowserStack

Tricentis recommends to close the browser after executing your TestCase on BrowserStack.

For further details on how to continue with the execution of a TestCase, refer to chapter "Run ExecutionLists".

Ensure that you specified the Access Key and the Username of the BrowserStack account and the Hub Address, which should be used for BrowserStack in the Settings dialog.

Execute TestCase via WebDriver

To execute a XBrowser TestCase via WebDriver, follow the steps below:

  1. Create the test configuration parameter HubAddress on the level of the TestCase you want to execute.

  2. In the Value column of the test configuration parameter HubAddress enter the IP address to the grid hub, you defined during scanning. For more information about the connected nodes, open the URL http://<IP:portnumber>/grid/console in your browser.

  3. Optionally, you can use the test configuration parameters Browser, BrowserVersion and OperatingSystem to further specify your test configuration.

Specifying test configuration parameters for execution on WebDriver

For further details on how to continue with the execution of a TestCase, refer to chapter "Run ExecutionLists".

Use WebDriver capabilities

In addition to the test configuration parameters Browser, BrowserVersion, HubAddress and OperatingSystem you can use all other capabilities provided by WebDriver to specify your test configuration. To view a list of possible WebDriver capabilities, click here , or here in particular for BrowserStack.

XBrowser Engine 3.0 only supports WebDriver capabilities which take a string or a list of strings as their value.

To use one of the capabilities, you first have to create a test configuration parameter. The name of the test configuration parameter must start with Webdriver_ and continue with the name of the capability. If you would like to define a capability name with a dot "." in its name, you have to use double underscore "__" instead of the dots.

Specifying WebDriver capabilities

Execute TestCase in headless browser

You can execute your TestCase in a headless Chrome or Firefox browser instance via WebDriver. The procedure depends on how you want to start the execution:

You cannot execute in an already running headless Firefox browser instance.

Execute in a new headless Chrome or Firefox browser instance

To execute in a new headless Chrome or Firefox browser instance, follow the steps below:

  1. Set up execution via WebDriver.

  2. Open a website with the Module OpenUrl. In the WebDriverBrowserArguments->Argument ModuleAttribute, specify the following:

    • the argument that starts the browser in headless mode, e.g. --headless

    • the argument that specifies a suitable window size, e.g. --window-size=1024x640

Execute in an already running headless Chrome browser instance

To execute in an already running headless Chrome browser instance, follow the steps below:

  1. Set up execution via WebDriver.

  2. Connect to the already running headless Chrome browser instance with the Module Connect to Chrome/Chromium application. In the Debug Port ModuleAttribute, specify the debug port under which the application runs.

Open a website

To open a website on a remote machine, use the Module OpenUrl.

For further details on how to open a website, refer to see chapter "Open website".

Close a browser

To close a website on a remote machine, use the Module CloseBrowser.

For further details on how to close a website, refer to see chapter "Close browser".