Steer remote browser

XBrowser WebDriver Modules are created by using 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 an 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 of the grid hub where you want to execute the TestCase. For example, if the grid hub is on your local machine, enter localhost. 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

You can use WebDriver capabilities to specify your test configuration. For the list of WebDriver capabilities, see the WebDriver documentation and the BrowserStack documentation.

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

To use a WebDriver capability, follow the steps below:

  1. Create a test configuration parameter in your TestCase.

  2. Name the test configuration parameter Webdriver_<capability>. Replace <capability> with the name of the capability. If the name of the capability contains a dot (.), replace this character with double underscore (__). If the name of the capability contains a colon (:), replace this character with triple underscore (___).

  3. Define the value of the capability. To specify a list of strings, separate the strings with semicolons (;).

Specify a WebDriver capability

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".