Locations
Locations describe the ARIA path to a user interface element such as a button. Locations are mainly recorded and not entered manually.
@ Locations
The @ character is used to determine a location. Each element in the path (separated by dots) represent a node in the ARIA tree. The element is typically described by a role (e.g. button) and a name or index.
Example |
Click @document(0).main.listbox("{~tc~} - Content").option("{~doc1~}") |
Location Block and Relative Locations
A location is relative to a location block when it starts with a period.
Variable resolution for the block happens in the line where it is declared.
Example |
// location block location @document(0).region("{~actions~}") { // relative location starting with "." Click @.menu("Actions").group("{~team~}").menuitemradio("Team") // absolute location in a location block Click @document(0).region("Team").menu("{~team~}") } |
Elements of Locations
Locations can be defined the following way. The recorded location should only be modified if necessary.
Location Possibilities |
// example location // document(0): the first document role (zero-based index) // document(1): would be a second web browser tab or window // main: the element with main role (without further label) // toolbar: the first element with toolbar role and label “Navigation Path” // button: the first element with button role and label “Home” @document(0).main.toolbar("Navigation Path").button("Home")
// describes the same location as above, because // “Navigation Path” is the first toolbar and “Home” is the first button // Attention: if the product changes and another toolbar is inserted the // test will break @document.main.toolbar(0).button(0) // element describes an arbitrary element @document.main.element(0).element(0) @document.main.element(0).element(LAST) // only the labels without defining the role @document.main."Navigation Path"."Home" // find the right row depending on the cell doc1 // the parent defines the row // the element with description “Activity” is child of the row and is clicked Click @document(0).main.tabpanel("ToDo").grid("{~worklist~} – To Do").rowgroup.row.gridcell("{~doc1~}").parent.element(DESCRIPTION=="Activity") // zero, one or more hierarchy levels: * @*.toolbar("Navigation Path").button("Home") // zero based index (<number>) (INDEX == <number>) // last element (LAST) // first element with the defined name (LABEL=="<name>") (NAME=="<name>") // first element with the defined role (TYPE=="<role>") (ROLE=="<role>") // first element with the defined description (DESCRIPTION=="<description>") // parent element parent // wildcards (LABEL like "*<name>*") (NAME like "*<name>*") (TYPE like "*<role>*") (ROLE like "*<role>*") (DESCRIPTION like "*<description>*") |