near()
Search relative HTML elements with this relativeSelector. An element is considered nearer to a reference element, only if the element offset is lesser than the 30px of the reference element in any direction. Default offset is 30px to override set options = {offset:50}
Examples
Section titled “Examples”await click(link("Block", near("name"))await click(link("Block", near("name", {offset: 50}))Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
selector | selector | string | Web element selector. |
opts | unknown | Default: {offset:30}. |
Returns
Section titled “Returns”| Type | Description |
|---|---|
| RelativeSearchElement | . |