2017 October Release

Location SyntaxPermanent link for this heading

The location describes an element on a web page (e.g. PAGES[LAST].BUTTONBAR.Cancel). The legacy connector allows the following syntax:

Formal Syntax in EBNF Notation

letter ::= [ "A" .. "Z" ];

digit ::= [ "0" .. "9" ];

symbol ::= "_" | "(" | ")";

wildcard ::= "*" ;

location-part ::= { letter | digit | symbol };

label ::= { letter | digit | symbol | wildcard };

expression ::= "[", [ "LABEL" | "TYPE" ], [ "==" | "!=" | "LIKE" ], """ | "'", label, """ | "'", "]";

location ::= { location-part, [ "." | expression ] };

Locations in the WAI-ARIA connector differ from the legacy locations (e.g. WINDOWS[0].main.form.application[button "Log in"]). The index in a location (the part between the square brackets) can be defined the following way:

WAI-ARIA Indices

<!-- 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>"]

<!-- first element with the defined role and the defined name -->
<!-- short form of [ROLE=="<role>" NAME=="<name>"]-->
[<role> "<name>"]

<!-- parent element -->
[..]

<!-- wildcards -->
[LABEL LIKE "<name>"]
[NAME LIKE "<name>"]
[TYPE LIKE "<role>"]
[ROLE LIKE "<role>"]
[DESCRIPTION LIKE "<description>"]

<!-- example -->
<Set parameter='param' location='WINDOWS[0].main[grid "Folder – Object List"].rowgroup.row[Name LIKE "w*3"][..][Description == "Last Changed on/at"]'/>

Note: [*] is a wildcard but no valid index.