Skip to content

$()

This selector lets you identify elements on the web page via XPath or CSS selector and proximity selectors.

Examples

await highlight($(`//*[text()='text']`))
await $(`//*[text()='text']`).exists()
$(`#id`,near('username'),below('login'))
$(() => {return document.querySelector('#foo');})
$((selector) => document.querySelector(selector), { args: '#foo' })
$((selector) => document.getElementById(selector), { args: 'foo' })

Parameters

Name Type Description
attrValuePairs unknown
_options Object Default: {}.
args relativeSelector Proximity selectors
selector string XPath or CSS selector or Function.

Returns

Type Description
DollarWrapper