Table of contents

Contents



Official Content

The following functions are intended to handle timing on test automation. 

While it is not recommended to use PauseFor (sleep time) on tests, sometimes it could be handy in troubleshooting.

PauseFor

image_201812716535_1_png

Pauses (sleep) during test execution.

Parameters:

  • seconds: the number of seconds to wait for. 

Example of use: 

&driver.PauseFor(3)

WaitByID

image_20181271664_1_png

Waits (explicitly) for a ceirtain HTML element to be present (or visible) on the webpage.

Parameters:

  • ID: the HTML element ID to wait for. 
  • Visible: When true, it also checks for an element to be visible.

Example of use: 

&driver.WaitById("button1", true)

WaitByLinkText

image_201812716711_1_png

Waits (explicitly) for a link to be present (or visible) on the webpage.

Parameters:

  • LinkText: the link text to wait for. 
  • Visible: When true, it also checks for an element to be visible. 

Example of use: 

&driver.WaitByLinkText("click here", true)

WaitByName

image_201812716744_1_png

Waits (explicitly) for a ceirtain HTML element to be present (or visible) on the webpage using the element Name.

Parameters:

  • Name: the HTML element NAME to wait for. 
  • Visible: When true, it also checks for an element to be visible. 

Example of use: 

&driver.WaitByName("LinksContainer", true)

WaitByCSS

image_201812716639_1_png

Waits (explicitly) for a ceirtain HTML element to be present (or visible) on the webpage using the CSS selector.

Parameters:

  • CSS: the CSS selector to the element that wants to wait for. 
  • Visible: When true, it also checks for an element to be visible. 

Example of use: 

&driver.WaitByCSS("#button1", true)

WaitByXPath

image_201812716810_1_png

Waits (explicitly) for a certain HTML element to be present (or visible) on the webpage using the XPath selector.

Parameters:

  • XPath: the XPath selector to the element that wants to wait for. 
  • Visible: When true, it also checks for an element to be visible. 

Example of use:

&driver.WaitByXPath("//span/input", true)

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