GXtest Web UI Commands by Control Name

Unofficial Content

Available commands

Here is the list of commands that are available to test in GXtest beta versions. These commands are supposed to be used with controls that are not inside grids.

Click

Command used to click a control

Parameters

ControlName (Character): name of the control to click

Example

&driver.Click("btn_enter")

Type

Command used to type text in input filed

Parameters

ControlName (Character): name of the control to input text

Text: the text to type in the field

Example

&driver.Type("clientname", "A Name")

Select

Command used to select an option in a combo box

Parameters

ControlName (Character): name of the control where the option is displayed

Option: the option to select

Example

&driver.Select("clientPreferredContactTime", "Morning")

GetText

Command used to retrieve the text of a control

Parameters

ControlName (Character): name of the control to retrieve the text

Example

&driver.GetText("ControlLabel")

 

GetValue

Command used to retrieve the value of a control

Parameters

ControlName (Character): name of the control to retrieve the value

Example

&driver.GetValue("btn_enter")

&driver.GetValue("CustomerId")

 

IsControlPresent

Command useful to know whether a control is present or not.

Parameters

ControlName(Character): name of the control where options are contained

Example

&driver.IsControlPresent("LoginButton")

 

IsControlEnabled

Command useful to know whether a control is present and enabled or not.

Parameters

ControlName(Character): name of the control where options are contained

Example

&driver.IsControlEnabled("LoginButton")

 

IsControlVisible

Command useful to know whether a control is present and visible or not.

Parameters

ControlName(Character): name of the control where options are contained

Example

&driver.IsControlVisible("LoginButton")

 

IsControlFocused

Command useful to know whether a control is present and focused or not.

Parameters

ControlName(Character): name of the control where options are contained

Example

&driver.IsControlFocused("UserNameField")

 

IsItemInList

This command is useful to check if an option is present in a combo box control.

Parameters

ControlName(Character): name of the control where options are contained

OptionText(Character): visible text to check its presence

Example

&driver.IsItemInList("countrySelect", "Uruguay")

 

SendKeys

This command allows you to send keys to the browser and controls.

There are 2 implementations of this command:

SendKeys(string ControlName, string Keys) // Send keys to a specific control

SendKeys(string Keys) // send keys to the current focused element or the page itself if there is none

Parameters:

ControlName (Character): name of the control to send the Keys

Keys (Character): keys to send. It's recommended to use the "Keys" domain to send special keys like enter, tab, esc, etc..

Can be used to confirm a form (Keys.Enter), to move over combo box options (Keys.DOWN and Keys.UP), navigate web elements (Keys.TAB), etc.

Examples:

&driver.SendKeys("optionsCtrl", Keys.DOWN)

&driver.SendKeys(Keys.Enter)

&driver.SendKeys(Keys.TAB)

 

FileUpload

This command allows you to set a file path to a file upload control.

Parameters:

ControlName (Character): name of the file upload control

FileName (Character): full or relative path of the file to upload