Skip to content

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

await click(link("Block", near("name"))
await click(link("Block", near("name", {offset: 50}))

Parameters

Name Type Description
selector selector | string Web element selector.
opts unknown Default: {offset:30}.

Returns

Type Description
RelativeSearchElement .