RelativeBy

Describes a mechanism for locating an element relative to others on the page.

Constructor

new RelativeBy(findDetails, filters)

Parameters:
NameTypeDefaultDescription
findDetailsBy
filtersArray.<Object>null

Methods

above(locatorOrElement) → (non-null) {RelativeBy}

Look for elements above the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

below(locatorOrElement) → (non-null) {RelativeBy}

Look for elements below the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

marshall() → (non-null) {Object}

Returns a marshalled version of the RelativeBy

Returns:

Object representation of a WebElement that will be used in #findElements.

Type: 
Object

near(locatorOrElement) → (non-null) {RelativeBy}

Look for elements near the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

toLeftOf(locatorOrElement) → (non-null) {RelativeBy}

Look for elements left the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

toRightOf(locatorOrElement) → (non-null) {RelativeBy}

Look for elements right the root element passed in

Parameters:
NameTypeDescription
locatorOrElementstring | WebElement
Returns:

Return this object

Type: 
RelativeBy

toString()