Table of contents

Contents



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

Sets maximum wait time (in seconds) that GXtest will wait for an element, on every interaction with the webpage. It must be used before the Start command.

Default value: 2s

Parameters:

  • seconds: the number of seconds to wait for. 

Example of use: 

&driver.SetImplicitWaitTimeout(30)
...
&driver.Start()

 

SetPageLoadTimeout

image_20193617241_1_png

Sets maximum wait time (in seconds) that GXtest will wait for the webpage to load. It must be used before the Start command.

Default value: 60s

Parameters:

  • seconds: the number of seconds to wait for. 

Example of use: 

&driver.SetPageLoadWaitTimeout(10) 
...
&driver.Start()

SetExplicitWaitTimeout

image_2018127144952_1_png

Sets 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)

 

 

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant