Skip to main content
Element Handle evaluation methods for the Puppeteer driver.

evaluate

Evaluate a function in the context of the element.
The element is passed as the first argument to the function.
Upstream docs
pageFunction
string
required
args
unknown[]
result
unknown
Return value
await element.evaluate('...');

$eval

Evaluate a function on the first child matching the selector. Upstream docs
selector
string
required
pageFunction
string
required
args
unknown[]
result
unknown
Return value
await element.$eval('...', '...');

$$eval

Evaluate a function on all children matching the selector. Upstream docs
selector
string
required
pageFunction
string
required
args
unknown[]
result
unknown
Return value
await element.$$eval('...', '...');