GXtest UI Commands - Timeouts

Official Content

Waiters and syncs are one of the biggest headaches 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 amount of seconds) otherwise it will fail and cancel test execution. Moreover, GXtest takes care of 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)

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