Get Table

Verb: getTable

Gets the user interface (UI) elements from a table found by the specified control selector.

Controls are, on Windows, elements that allow the user to interact with an application. Controls can be buttons, data entry fields, menus, and various other elements.

Syntax

getTable --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)] (DataTable)=value (Numeric)=rows (Numeric)=columns

Inputs

Script Designer Required AcceptedTypes Description
--selector Selector Required ControlSelectors Type of selector used to identify user interface controls. The following options are available:

:ref(getTable.selector. *)

It is possible to use the IBM RPA Studio's recorder to map the controls and obtain the necessary information for the “Selector” parameters, in addition to inserting commands in the script with automatic filling of these parameters. The recorder is available in the upper toolbar on the platform.
--id ID Only whenSelector is Id, IdAndName Text User interface control id, from which the value should be obtained.
--name Name Only whenSelector is Name, NameAndValue, IdAndName, TypeAndName Text Name of the UI control from which the value should be obtained.
--innertext Inner Text Only whenSelector is InnerTextAndTag Text UI Control Inside Text
--tagname Element type Only whenSelector is InnerTextAndTag Text Type of the element from which the value is to be obtained.
--xpath XPath Only whenSelector is XPath Text XPath path of the UI control.
--classname Class Only whenSelector is ClassAndValue, ClassName Text User interface control class.
--elementvalue Element Value Only whenSelector is ClassAndValue, NameAndValue Text Current value of the UI control.
--controltype Control Type Only whenSelector is TypeAndIndex, TypeAndName ControlTypes Type of user interface control that should be parsed in the user interface (UI).

Options:

  • Button
  • Check box
  • Child window
  • Combo box
  • Generic
  • Image
  • Label
  • List box
  • Menu bar
  • Menu item
  • Progress bar
  • Radio button
  • Scroll bar
  • Slider
  • Spinner
  • Status bar
  • Tab page
  • Tab panel
  • Table
  • Text box
  • Toggle button
  • Tree view
  • TreeTable
  • Window

  • The type of control indicated for this operation is "Table".
    --index Index Only whenSelector is TypeAndIndex Number Index of the UI control specified at Control Type, from which the value should be obtained.
    --control Control Only whenSelector is Instance Control Control instance.
    This variable is obtained using the command Search Control.
    --usetable Use Table Optional Boolean When enabled, fetches an element within the table by column or row.
    --searchbycolumn Search by column Optional Boolean When enabled, fetches the element through the column, not by row.
    --searchcolumn Search column Only whenUse Table is True Text Name or column number from which to get the element.
    --searchvalue Search Value Only whenSearch by column is True Text Value used to find the element in the table.
    --returncolumn Return Column Only whenSearch by column is True Text Column that contains the control.
    --row Row Only whenSearch by column is False Number Table row from which the element is obtained.
    --timeout Timeout Optional Time Span, Number, Text Maximum wait time to execute the command to find the element specified by Selector.
    If no value is set in the parameter of type timeout, execution uses the context time defined by the command Set Timeout. If the script does not use this command, the default time is 5 seconds.

    Outputs

    Script Designer AcceptedTypes Description
    value Table Data Table Table with the elements that have been recognized.
    rows Rows Number Number of table rows.
    columns Columns Number Number of table columns.

    Example

    The command gets all data and table structure of a specific application through the "XPath" control selector, returning this table along with the existing row and column quantities.

    defVar --name windowApplication --type Window
    defVar --name table --type DataTable
    defVar --name rows --type Numeric
    defVar --name columns --type Numeric
    // Download the following file to execute the command. 
    launchWindow --executablepath "CSharpTestApp.exe" windowApplication=value
    focusWindow --window ${windowApplication}
    getTable --selector "XPath" --xpath "/root/table[1]" --timeout 00:05:00 table=value rows=rows columns=columns
    logMessage --message "Table: ${table}\r\nRows: ${rows}\r\nColumns: ${columns}\r\n" --type "Info"
    

    Download File

    For the above script to work correctly, you need to download the file and enter its path in the Executable parameter of the :link (launchWindow) command.
    Output values vary depending on the application used by the user.
    To execute this command, you must first start a new window on Windows.

    Remarks

    You can use the IBM RPA Studio's recorder to get the following information:

  • "Class Name", used in Class;
  • "Id", used in ID;
  • "Inner Text", used in Inner 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
  • Click on Value
  • Close Window
  • Control Screenshot
  • Count Windows
  • Expand Tree
  • 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 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