Identifiers

An identifier uniquely identifies an element within a page. It is either a selector, a page model reference or a reference to an element passed to an imported step.

Syntax

{selector}|{page-model-reference}|{passed-element-reference}

------------------------------------------------------------

selector:
    <selector>

page-model-reference:
    ${import-name}.elements.{element-name}

passed-element-reference:
    $elements.{element-name}

import-name:
    <string>

element-name:
    <string>

Examples

$"#element-id" CSS selector matching against the element id attribute.
$"//*[@id='element-id']" XPath expression matching against the element id attribute.
$".listed-item":1 CSS selector matching all elements with the listed-item
class name, fetching the first item in the list.
$".listed-item":3 CSS selector matching all elements with the listed-item
class name, fetching the third item in the list.
$".listed-item":first Special position keyword first is equivalent to :1.
$".listed-item":1 Special position keyword last fetches the last matching item.
$google_com.elements.search_button Page model element reference.
$elements.element_name Passed element reference.