Table of contents

Contents



Official Content

Select commands are used to choose an option from drop-down boxes (and radiobuttons if using controlName commands) using the visible Text of the elements. 

Select

select_png

Selects an option using drop-down or radiobutton's control name.

Parameters

  • ControlName: name of the control where the option is displayed
  • Value: the option to select

Example

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

Select

SelectGrid_png

Selects an option using the drop-down or radiobutton's control name inside a grid.

Parameters

  • ControlName: name of the control where the option is displayed
  • Row: row number inside the grid to locate the control
  • Value: the option to select

Example

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

SelectByID

selectByID_png

Selects an option using drop-down's ID attribute.

Parameters:

  • ID: the HTML element ID of the drop-down control.
  • Text: the visible text of the option to choose. 

Example of use: 

&driver.SelectById("Country", "England")

SelectByName

selectbyname_png

Selects an option using drop-down's 'name' attribute.

Parameters:

  • Name: the 'name' attribute of the drop-down control.
  • Text: the visible text of the option to choose. 

Example of use: 

&driver.SelectByName("City", "London")

SelectByCSS

SelectByCSS_png

Selects an option from a drop-down using a CSS selector.

Parameters:

  • CSS: the CSS selector to the drop-down that you want to Select. 
  • Text:  the visible text of the option to choose. 

Example of use: 

&driver.SelectByCSS("#currency", "US Dollars")

SelectByXPath

selectByXpath_png

Selects an option from a drop-down using an XPath selector.

Parameters:

  • XPath: the XPath selector to the drop-down item that you want to Select
  • Text:  the visible text of the option to choose

Example of use:

&driver.SelectByXPath("//select[@id='groupSelect']", "First Option")


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