# Class RelativeBy

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

#### Final

#### Hierarchy

- RelativeBy

#####
Index

### Constructors

constructor

### Methods

above
below
marshall
near
toLeftOf
toRightOf
toString

## Constructors

### constructor

- new RelativeBy(findDetails, filters): RelativeBy

- #### Parameters

  - ##### findDetails: By

  - ##### filters: Object[]

  #### Returns RelativeBy

## Methods

### above

- above(locatorOrElement): RelativeBy

- Look for elements above the root element passed in

  #### Parameters

  - ##### locatorOrElement: WebElement | Locator

  #### Returns RelativeBy

  Return this object

### below

- below(locatorOrElement): RelativeBy

- Look for elements below the root element passed in

  #### Parameters

  - ##### locatorOrElement: WebElement | Locator

  #### Returns RelativeBy

  Return this object

### marshall

- marshall(): Object

- Returns a marshalled version of the RelativeBy

  #### Returns Object

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

### near

- near(locatorOrElement): RelativeBy

- Look for elements near the root element passed in

  #### Parameters

  - ##### locatorOrElement: WebElement | Locator

  #### Returns RelativeBy

  Return this object

### toLeftOf

- toLeftOf(locatorOrElement): RelativeBy

- Look for elements left the root element passed in

  #### Parameters

  - ##### locatorOrElement: WebElement | Locator

  #### Returns RelativeBy

  Return this object

### toRightOf

- toRightOf(locatorOrElement): RelativeBy

- Look for elements right the root element passed in

  #### Parameters

  - ##### locatorOrElement: WebElement | Locator

  #### Returns RelativeBy

  Return this object

### toString

- toString(): string

- #### Returns string

Generated using TypeDoc