Action group: Windows Subgroup "Interaction with Win-elements"
The action checks the specified element and returns elements related to it (parent/child/neighboring).
Example in Notepad:
"Status bar" is the neighboring element to "Scale". Parent element - "View". Daughter elements: "Zoom in", "Zoom out", "Set scale by default".
Parameter | Description |
---|---|
Element | Parameter that stores the data of the Win-element whose coordinates will be checked. |
Type of connection | Drop-down list with elements: "Parent elements", "Daughter elements", "Neighboring elements". If "Parent element" is selected, the result will be a collection with Win-elements that are the parents of the specified element. If "Daughter elements" is selected, the result will be a collection with Win-elements that are daughters to the specified element. If "Neighboring elements" is selected, the result will be a collection with Win-elements that are "neighbors" for the specified element, I.e. they have a common parent. |
Search depth | Nesting level of related elements to which the search will be performed. A positive integer from 1 to infinity. Default value is "1". The depth is not taken into account if the value "Neighboring elements" is selected in the "Type of connection" field. If the depth specified in the parameter is greater than the actual depth in the application, then all elements up to the actual depth are taken. |
Time-out, ms | Time in milliseconds for which the desired element will be searched. |
Window order | Sequence number of the window that the action should work with if there are multiple windows. In this case, the action searches only for those windows in which the element should be located according to its parameters. A positive integer from 1. The default is "1". |
Result - a collection of Win-elements.
Property | Description | Type | Filling example | Mandatory field |
---|---|---|---|---|
Parameters | ||||
Element | A resource that stores data about the selected application element. | Robin.WinElement | Yes | |
Type of connection | The type of relationship between the elements being searched for and the specified element. You can search for elements that are parent, child, or neighbor to the specified element. Neighbors share a common parent element with the searched element. | Robin.String | Yes | |
Search depth | The nesting level of related elements to which the search will be performed. If the specified depth is greater than the actual depth, the action will return all elements up to the actual depth. The default value is 1. The parameter is ignored if the "Neighboring items" value is selected in the "Type of connection" field. | Robin.Numeric | No | |
Time-out, ms | The time in milliseconds for which the desired element will be searched. | Robin.Numeric | No | |
Window order | The sequence number of the window that the action should work with. If you do not specify a window number, the first window will be checked. The numbering starts from 1. | Robin.Numeric | No | |
Results | ||||
Result | A collection with related elements. | Robin.Collection |
If the user selects "Parent elements" in the "Type of connection" field and the specified Win-element does not have a parent, an empty collection will be returned as a result.
If the user selects "Neighboring elements" in the "Type of connection" field and the specified Win-element does not have neighbors, an empty collection will be returned as a result.
If the user selects "Daughter elements" in the "Type of connection" field and the specified Win-element does not have daughters, an empty collection will be returned as a result.
The graph traversal method is in width.
A Notepad is opened. Get related elements of the "Scale" element.
Use the "Get related elements" action.
The program robot completed successfully.
Daughter elements "Zoom in", "Zoom out", "Set scale by default" were obtained.
The program robot completed successfully.
Parent element "View" was obtained.
The program robot completed successfully.
The neighboring element "Status bar" was obtained.