enum

Marionette::LocationStrategy

Inherits Enum / Comparable / Value / Object

Constants

ID = 0

Search using the HTML id property of the given element.

XPath = 1

Search using an XPath expression. Here is a helpful XPath cheatsheet.

LinkText = 2

Use the text of a given link to search.

PartialLinkText = 3

Use only some of a given link's text to search.

Name = 4

Search using the HTML name property of the given element.

TagName = 5

Search using a tag name (i.e. div or span)

ClassName = 6

Search using a the HTML class property of a given element.

Css = 7

Search using a standard CSS selector. (i.e. #some-element li:nth-child(2) > a)

Instance methods

class_name?

Returns true if this enum value equals ClassName

Source
css?

Returns true if this enum value equals Css

Source
id?

Returns true if this enum value equals ID

Source
name?

Returns true if this enum value equals Name

Source
tag_name?

Returns true if this enum value equals TagName

Source
to_s

Returns a String representation of this enum member. In the case of regular enums, this is just the name of the member. In the case of flag enums, it's the names joined by vertical bars, or "None", if the value is zero.

If an enum's value doesn't match a member's value, the raw value is returned as a string.

Color::Red.to_s                     # => "Red"
IOMode::None.to_s                   # => "None"
(IOMode::Read | IOMode::Write).to_s # => "Read | Write"

Color.new(10).to_s # => "10"
Source
x_path?

Returns true if this enum value equals XPath

Source