Locator

Represents the locator to locate nodes in the browsing context. Described in https://w3c.github.io/webdriver-bidi/#type-browsingContext-Locator.

Constructor

new Locator()

Methods

(static) css(value) → {Locator}

Creates a new Locator object with CSS selector type.

Parameters:
NameTypeDescription
valuestring

The CSS selector value.

Returns:

A new Locator object with CSS selector type.

Type: 
Locator

(static) innerText(value, ignoreCaseopt, matchTypeopt, maxDepthopt) → {Locator}

Creates a new Locator object with the specified inner text value.

Parameters:
NameTypeAttributesDescription
valuestring

The inner text value to locate.

ignoreCaseboolean | undefined<optional>

Whether to ignore the case when matching the inner text value.

matchTypestring | undefined<optional>

The type of matching to perform (full or partial).

maxDepthnumber | undefined<optional>

The maximum depth to search for the inner text value.

Returns:

A new Locator object with the specified inner text value.

Type: 
Locator

(static) xpath(value) → {Locator}

Creates a new Locator object with the given XPath value.

Parameters:
NameTypeDescription
valuestring

The XPath value.

Returns:

A new Locator object.

Type: 
Locator