GXtest UI Commands - Click

Official Content
This documentation is valid for:

These commands are used to perform click or double click actions over controls and elements.

Click

click_png

Goal: To click a control using its name.

Parameters

  • ControlName (Character): name of the control to click

Example

&driver.Click("btn_enter")

Click

ClickGridCommand_png

Goal: To click a control inside a grid using its name.

Parameters

  • ControlName (Character): name of the control to click
  • Row (Numeric): row number inside the grid of the element to click. To click the first row use number 1 and so on. 

Example

&driver.Click("btn_edit", 2)

ClickByID

image_201812718015_1_png

Goal: To click an HTML element using the control's ID.

Parameters:

  • ID: the HTML element ID to click.

Example of use:

&driver.ClickById("BTN1")

ClickByLinkText

image_201812718042_1_png

Goal: To click a link using its text.

Parameters:

  • LinkText: the link text to click.

Example of use: 

&driver.ClickByLinkText("click here:")

ClickByName

image_20181271817_1_png

Goal: To click a certain HTML element using its 'name' attribute.

Parameters:

  • Name: the NAME attribute of the control to click. 

Example of use: 

&driver.ClickByName("BTN2")

ClickByCSS

image_201812718140_1_png

Goal: To click an HTML element using a CSS selector.

Parameters:

  • CSS: the CSS selector to the element that you want to click. 

Example of use: 

&driver.ClickByCSS("#button1")

ClickByXPath

image_20181271829_1_png

Goal: To click an HTML element using an XPath selector.

Parameters:

  • XPath: the XPath selector to the element that wants to be clicked. 

Example of use: 

&driver.ClickByXPath("//span/input")

DoubleClick

DoubleClick_png

Goal: To double click a control using its name.

Parameters:

  • ControlName: the name of the control to double click. 

Example of use: 

&driver.DoubleClick("Image1")

DoubleClick

DoubleClickGrid_png

Goal: To double click a control inside a grid using its name.

Parameters:

  • ControlName: the name of the control to double click.
  • Row (Numeric): row number inside the grid of the element to click. To click the first row use number 1 and so on. 

Example of use: 

&driver.DoubleClick("Image1", 3)

DoubleClickByID

image_2018127181850_1_png

Goal: To double click an HTML element using the control's ID.

Parameters:

  • ID: the HTML element ID to double click. 

Example of use: 

&driver.DoubleClickById("control2")

DoubleClickByName

image_201812718246_1_png

Goal: To double click an HTML element using the 'name' attribute.

Parameters:

  • Name: the NAME attribute of the control to double click.

Example of use:;

&driver.DoubleClickByName("vVAR1")

DoubleClickByCSS

image_2018127182616_1_png

Goal: To double click a certain HTML element using a CSS selector.

Parameters:

  • CSS: the CSS selector to the element that you want to double click. 

Example of use: 

&driver.DoubleClickByCSS("#IMAGE1")

DoubleClickByXPath

image_2018127182726_1_png

Goal: To DoubleClick a certain HTML element using an XPath selector.

Parameters:

  • XPath: the XPath selector to the element that wants to be double-clicked. 

Example of use: 

&driver.DoubleClickByXPath("//span/input")