These commands are supposed to be used with controls that are not inside grids.
Command used to click a control
Parameters
ControlName (Character): name of the control to click
Example
&driver.Click("btn_enter")
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")
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")
Command used to retrieve the text of a control
Parameters
ControlName (Character): name of the control to retrieve the text
Example
&driver.GetText("ControlLabel")
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")
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")
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")
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")
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")
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")
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)
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