Predicate

A predicate is used to select one or more element on the page.

name

required false
type string
default “”

The name of the predicate. This will be output for reference of the current predicate being run.

Example

    predicate:
      name: "Find element with name 'q'"
      type: "by_name"
      selector: "q"
      multi: true

type

required false
type string
default “default”

The type of predicate.

Options

Type find (default) multi first
default
by_button
by_class
by_id  
by_label
by_link
by_name
by_xpath
for_appium    

Example

    predicate:
      name: "Find element with name 'q'"
      type: "by_name"
      selector: "q"
      multi: true

selector

required true
type string
default “”

The selector for finding the element.

Example

    predicate:
      name: "Find element with name 'q'"
      type: "by_name"
      selector: "q"
      multi: true

text

required type == by_appium
type string
default “”

The text to select with. Only used for by_appium type.

Example

    predicate:
      type: "for_appium"
      selector: ""
      text: ""

multi

required false
type boolean
default false

Whether or not the predicate should do multi-selection.

Example

    predicate:
      name: "Find element with name 'q'"
      type: "by_name"
      selector: "q"
      multi: true

first

required false
type boolean
default false

Whether or not to only return the first element.

Example

    predicate:
      type: "by_label"
      selector: "Foo"
      first: true