Click on Value
Verb: clickOnValue
Clicks on the informed value of a TreeView, in a user control interface.
In computing, a TreeView is a graphic interface element that allows the user to display hierarchical data in the form of a tree, expanding or collapsing branches and nodes.
Syntax
clickOnValue --value(String) [--forcerefresh(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)]
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--value | Value | Required | Text | Values that should be clicked on the TreeView, separating each node with a line break. |
--forcerefresh | Update screen cache | Optional | Boolean | When enabled, performs a new reading of the screen before executing the command to identify new elements and update the screen cache.
This identification is necessary for the command to work, in case there are any changes on the screen. |
--selector | Selector | Required | ControlSelectors | Type of selector used to identify user interface controls. There are the following options:
You can use the IBM RPA Studio's recorder to map the controls and obtain the necessary information for the "Selector" parameters. You can also add commands using the autocomplete function. The recorder is available in the IBM RPA Studio's main menu. |
--id | Id | Only whenSelector is Id, IdAndName | Text | TreeView id that should be clicked on. |
--name | Name | Only whenSelector is Name, NameAndValue, IdAndName, TypeAndName | Text | Name of the TreeView that should be clicked on. |
--innertext | Text | Only whenSelector is InnerTextAndTag | Text | TreeView internal text that should be clicked on. |
--tagname | Element Type | Only whenSelector is InnerTextAndTag | Text | Type of the element that should be clicked on. |
--xpath | XPath | Only whenSelector is XPath | Text | XPath that leads to the TreeView that should be clicked on. |
--classname | Class | Only whenSelector is ClassAndValue, ClassName | Text | TreeView class that should be clicked on. |
--elementvalue | Element Value | Only whenSelector is ClassAndValue, NameAndValue | Text | Value of the element that should be clicked on. |
--controltype | Type | Only whenSelector is TypeAndIndex, TypeAndName | ControlTypes | Type of control that is used to identify the element that should be clicked on. |
--index | Index | Only whenSelector is TypeAndIndex | Number | Index of the element that should be clicked on. |
--control | Control | Only whenSelector is Instance | Control | Control instance.
This variable is obtained using the command Search Control. |
--usetable | Element in Table | Optional | Boolean | When enabled, search for an element from within a table. |
--searchbycolumn | Search by Column | Optional | Boolean | When enabled, it searches for an element within a specific column of the table. |
--searchcolumn | Column | Only whenElement in Table is True | Text | Column where the element is searched for. |
--searchvalue | Value | Only whenSearch by Column is True | Text | Value that is used to search for the element in the table. |
--returncolumn | Return Column | Only whenSearch by Column is True | Text | Column where the element's control is. |
--row | Row | Only whenSearch by Column is False | Number | Line number from which the element is obtained.
This parameter is ignored if Search by Column is enabled. |
--timeout | Timeout | Optional | Time Span, Number, Text | Timeout for executing the command.
If no value is defined in the parameter of type timeout, the execution uses the time defined by the Set Timeout command. If the script does not use this command, the default time is 5 seconds. |
Example
An executable program that has a TreeView is opened, with the command Click on Value being used to click on the values informed within the TreeView.
defVar --name applicationWindow --type Window
defVar --name executionSuccess --type Boolean
launchOrAttach --executablepath CSharpTestApp.exe --title Users applicationWindow=value executionSuccess=success
assert --message "Did not find the demo application!" --left "${executionSuccess}" --operator "Is_True"
focusWindow --window ${applicationWindow}
clickOnValue --value "Tree\r\nColors\r\nBlue" --selector "Id" --id treeView1
Download File
For the correct operation of the script above, it is necessary to download the file and insert its path in the Executable path parameter of the Launch or Attach Window command.
Remarks
It is possible to use the IBM RPA Studio's recorder to obtain the following information: