mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: add documentation to xpath prefix and deprecated page.waitForTimeout (#9014)
This commit is contained in:
committed by
Randolf J
parent
5dbd69e1a4
commit
b7b07e3790
@@ -8,11 +8,15 @@ sidebar_label: ElementHandle.waitForXPath
|
||||
>
|
||||
> Use [ElementHandle.waitForSelector()](./puppeteer.elementhandle.waitforselector.md) with the `xpath` prefix.
|
||||
>
|
||||
> Example: `await elementHandle.waitForSelector('xpath/' + xpathExpression)`
|
||||
>
|
||||
> The method evaluates the XPath expression relative to the elementHandle.
|
||||
>
|
||||
> Wait for the `xpath` within the element. If at the moment of calling the method the `xpath` already exists, the method will return immediately. If the `xpath` doesn't appear after the `timeout` milliseconds of waiting, the function will throw.
|
||||
>
|
||||
> If `xpath` starts with `//` instead of `.//`, the dot will be appended automatically.
|
||||
>
|
||||
> This method works across navigation
|
||||
> This method works across navigation.
|
||||
>
|
||||
> ```ts
|
||||
> const puppeteer = require('puppeteer');
|
||||
|
||||
Reference in New Issue
Block a user