GXtest UI Commands - WebDriver

Official Content

WebDriver is a w3c standard to handle test automation on most popular browsers. GXtest takes advantage of this standard while providing an abstraction layer in GeneXus to create UI tests.

There are 3 main functions in order to start a new UI test. By default, all test will run in a local browser using a driver unless you specify the opposite:

If you don't specify a browser type inside your test (using SetBrowser function) the test will run using the Knowledge Base property that is set under Test section:


As a good practice if you want to run tests on another browser, change this property instead of setting the browser type inside the test.



Goal: To set the browser type to be used in the test. 


  • browser: A string with browser type (you can use Browsers domain for this purpose like the example)

Example of use: 


Note: As mentioned, it is recommended to avoid using this function and to change the default browser property in the KB properties instead. 



Goal: To start a test session using WebDriver

Example of use: 




Goal: To end a test session using WebDriver

Example of use: 


To run tests on any remote web driver node (Selenium node or Cloud), you can use these 2 functions:


Goal: To add a desired capability for a Remote WebDriver node. 


  • capabilityName: A capability key name. 
  • capabilityValue: The capability desired value.

Returns: n/a

Example of use: 

&driver.AddCapability("browserName", "MicrosoftEdge")
&driver.AddCapability("platform", "Windows 10")
&driver.AddCapability("version", "16.16299")


Goal: To set a remote WebDriver node URL to spin remote browsers. 


  • URL: The remote WebDriver node.

Returns: n/a

Example of use: 


Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.