Select Row
Selects a row from a table, obtained using the IBM RPA Studio's recorder tool.
Command availability: IBM RPA SaaS and IBM RPA on premises
Script syntax
IBM RPA's proprietary script language has a syntax similar to other programming languages. The script syntax defines the command's syntax in the script file. You can work with this syntax in IBM RPA Studio's Script mode.
selectRow --rowindex(Numeric) [--simulatehuman(Boolean)] --selector(ControlSelectors) --id(String) --name(String) --innertext(String) --tagname(String) --xpath(String) --classname(String) --elementvalue(String) --controltype(Nullable<ControlTypes>) --index(Numeric) --control(Control) [--usetable(Boolean)] [--searchbycolumn(Boolean)] --searchcolumn(String) --searchvalue(String) --returncolumn(String) --row(Numeric) [--timeout(TimeSpan)]
Dependencies
- Use the Focus (
focus
) or Focus Window (focusWindow
) commands and keep the display scale at 100% before the Click (click
) command for correct functioning of the Simulate Human (simulatehuman
) parameter.
Input parameter
The following table displays the list of input parameters available in this command. In the table, you can see the parameter name when working in IBM RPA Studio's Script mode and its Designer mode equivalent label.
Designer mode label | Script mode name | Required | Accepted variable types | Description |
---|---|---|---|---|
Row Index | rowindex |
Required |
Number |
Index of the row to be selected. |
Simulate Human | simulatehuman |
Optional |
Boolean |
Turn on to simulate the human gesture selecting the row on the user interface control. For non-Java applications, this parameter does not affect the behavior of the command. |
Selector | selector |
Required |
ControlSelectors |
Type of selector to identify the user interface controls. You can use the IBM RPA Studio's recorder to map the controls and obtain the information needed for this parameter. See the selector parameter options. |
Id | id |
Required when the Selector parameter is Id, IdAndName |
Text |
The control's unique identifier. In SAP GUI, use the ID selector to map a GridView control. See Mapping GridView controls for details on how GridView ID selectors work. |
Name | name |
Required when the Selector parameter is Name, NameAndValue, IdAndName, TypeAndName |
Text |
The control name. |
Text | innertext |
Required when the Selector parameter is InnerTextAndTag |
Text |
The inner text that the control displays. |
Control Type | tagname |
Required when the Selector parameter is InnerTextAndTag |
Text |
The tag name of the control. |
XPath | xpath |
Required when the Selector parameter is XPath |
Text |
The path through the control tree to the target control. |
Class | classname |
Required when the Selector parameter is ClassAndValue, ClassName |
Text |
The name of the class that instantiates the control. |
Control Value | elementvalue |
Required when the Selector parameter is ClassAndValue, NameAndValue |
Text |
The value stored by the control. |
Type | controltype |
Required when the Selector parameter is TypeAndIndex, TypeAndName |
ControlTypes |
The type of the control. See the controltype parameter options. |
Index | index |
Required when the Selector parameter is TypeAndIndex |
Number |
The position of the control. The index starts with zero being the first control among equal types. |
Control | control |
Required when the Selector parameter is Instance |
Control |
The control instance. Obtain the Control variable type by the Search Control command. |
Element is in Table | usetable |
Optional |
Boolean |
Enable to make it possible to find an element within a table, by column or row. |
Search by Column | searchbycolumn |
Optional |
Boolean |
Enable to search for an element within a specific column of the table. |
Column | searchcolumn |
Required when the Element in Table parameter is True |
Text |
The column where the element is searched for. |
Value | searchvalue |
Required when the Search by Column parameter is True |
Text |
The value used to search the element in the table. |
Return Column | returncolumn |
Required when the Search by Column parameter is True |
Text |
The column that contains the control. |
Row | row |
Required when the Search by Column parameter is False |
Number |
The row number to obtain the element. To dismiss this parameter, enable the Search by Column parameter. |
Timeout | timeout |
Optional |
Time Span , Number , Text |
The maximum waiting time to find the control. When blank, the default timeout is 5 seconds. |
selector
parameter options
The following table displays the options available for the selector
input parameter. The table shows the options available when working in Script mode and the equivalent label in the Designer mode.
Designer mode label | Script mode name | Description |
---|---|---|
Class and value | ClassAndValue |
It matches the control class name and the value. |
Class name | ClassName |
It matches the class name that instantiates the control. |
Id | Id |
It matches the control's unique identifier. |
Id and name | IdAndName |
It matches the unique identifier and the control name. |
Inner text and control type | InnerTextAndTag |
It matches the control inner text and its type attributes. |
Instance | Instance |
It matches the control instance. |
Name | Name |
It matches the control name. |
Name and value | NameAndValue |
It matches the control name and the value. |
Type and index | TypeAndIndex |
It matches the control type and the index of its position among controls of equal type. |
Type and name | TypeAndName |
It matches the control type and the name. |
Vision | Vision |
It matches the mapped image that identifies the control. |
XPath | XPath |
It matches the path through the control tree to the target control. |
You can use the IBM RPA Studio's recorder to map the controls and obtain the following selectors:
- Class Name
- Id
- Inner Text
- Link text
- Name
- Tag Name
- XPath
controltype
parameter options
The following table displays the options available for the controltype
input parameter. The table shows the options available when working in Script mode and the equivalent label in the Designer mode.
Designer mode label | Script mode name | Description |
---|---|---|
Button | Button |
It matches the Button control in the application. |
Check box | CheckBox |
It matches the Check box control in the application. |
Child window | ChildWindow |
It matches the Child window control in the application. |
Combo box | ComboBox |
It matches the Combo box control in the application. |
Generic | Generic |
It matches the Generic control in the application. |
Image | Image |
It matches the Image control in the application. |
Label | Label |
It matches the Label control in the application. |
List box | ListBox |
It matches the List box control in the application. |
Menu bar | MenuBar |
It matches the Menu bar control in the application. |
Menu item | MenuItem |
It matches the Menu item control in the application. |
Progress bar | ProgressBar |
It matches the Progress bar control in the application. |
Radio button | RadioButton |
It matches the Radio button control in the application. |
Scroll bar | ScrollBar |
It matches the Scroll bar control in the application. |
Slider | Slider |
It matches the Slider control in the application. |
Spinner | Spinner |
It matches the Spinner control in the application. |
Status bar | StatusBar |
It matches the Status bar control in the application. |
Tab page | TabPage |
It matches the Tab page control in the application. |
Tab panel | TabPanel |
It matches the Tab panel control in the application. |
Table | Table |
It matches the Table control in the application. |
Text box | TextBox |
It matches the Text box control in the application. |
Toggle button | ToggleButton |
It matches the Toggle button control in the application. |
Tree view | TreeView |
It matches the Tree view control in the application. |
TreeTable | TreeTable |
It matches the TreeTable control in the application. |
Window | Window |
It matches the Window control in the application. |
Example
The example below is an illustration on how to use the Launch and Attach Window command.
// Enter the path to an application that has a grid view.
launchWindow --executablepath "Application.exe"
// Use the recorder to get the information used in the command parameters.
selectRow --rowindex 2 --simulatehuman --selector "IdAndName" --id dgvList --name DataGridView
// After selecting the line, still using the recorder to get the information, double-click.
click --selector "IdAndName" --doubleclick --controlsimilarity 100 --forcerefresh --id dgvList --name DataGridView
Limitations
- For non-Java applications, this parameter does not affect the behavior of the command.