GXtest UI Commands - Timeouts

Unofficial Content

Waiters and syncs are one of the biggest headache in test automation. To avoid that, each time an action is executed against an HTML element GXtest waits (implicitly) for that element to be present on the webpage (until a certain amounts of seconds) otherwise it will fail and cancel test execution. Moreover, GXtest takes care about several Ajax and JS events to make test automation robust while providing an interface to set timeouts using the following functions:

 

SetImplicitWaitTimeout

image_2018127145034_1_png

Goal: To define maximum wait time (in seconds) that GXtest will wait for an element, on every interaction with the webpage.

Default value: 10s

Parameters:

  • seconds: the number of seconds to wait for. 

Example of use: 

&driver.SetImplicitWaitTimeout(30)

 

SetPageLoadWaitTimeout

image_20193617241_1_png

Goal: To define maximum wait time (in seconds) that GXtest will wait for the webpage to load.

Default value: 60s

​​​​​Parameters:

  • seconds: the number of seconds to wait for. 

Example of use: 

&driver.SetPageLoadWaitTimeout(10)

 

SetExplicitWaitTimeout

image_2018127144952_1_png

Goal: To define maximum wait time (in seconds) for the elements used to be present/visible on the webpage when using Waiter functions.

Default value: 10s

Parameters:

  • seconds: the number of seconds to wait for. 

Example of use: 

&driver.SetExplicitWaitTimeout(20)

 

SetAsyncScriptTimeout

image_2018127144920_1_png

Goal: To define maximum wait time (in seconds) for an "async script" to end running.

Default value: 60s

Parameters:

  • seconds: the number of seconds to wait for. 

Example of use: 

&driver.SetAsyncScriptTimeout(10)