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.


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)]


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:
  • Class and value
  • Class name
  • Id
  • Id and name
  • Inner text and control type
  • Instance
  • Name
  • Name and value
  • Type and index
  • Type and name
  • XPath
  • 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.


    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.


    It is possible to use the IBM RPA Studio's recorder to obtain the following information:

  • "Class Name", used in Class;
  • "Id", used in Id;
  • "Inner Text", used in Text;
  • "Name", used in Name;
  • "Tag Name", used in Element Type;
  • "XPath", used in XPath.
  • See Also

  • Attach Window
  • Cancel Token Source
  • Clear Cache
  • Click
  • Click on Cell
  • Click on Menu
  • Close Window
  • Control Screenshot
  • Count Windows
  • Expand Tree
  • Find Internet Explorer Browser
  • Find Window
  • Find Windows
  • Focus
  • Focus Window
  • Get Barcode
  • Get Bounds
  • Get Cell Value
  • Get Control
  • Get Image Grid
  • Get Interval
  • Get Options
  • Get Table
  • Get Table Information
  • Get Tree Nodes
  • Get Value
  • Handle Open File Dialog
  • Handle Save File Dialog
  • Launch and Attach Window
  • Launch or Attach Window
  • Map Image Grid
  • Maximize or Minimize Window
  • Offset Value
  • Screenshot Window
  • Search Control
  • Select Row
  • Select Tab
  • Set Execution Throttling
  • Set Grid Value
  • Set Value
  • Update Window
  • Verify Enabled
  • Verify If Visible
  • Wait and Close Security Window
  • Wait Busy Window
  • Wait Control
  • Wait for Control to Enable
  • Wait for Window to Appear
  • Wait for Window to Close
  • Watch and Close Window