docs(puppeteer): fix broken waitForLoadState code snippet (#18212)

This commit is contained in:
smacpherson64 2022-10-20 12:50:41 -05:00 committed by GitHub
parent 5ed552838e
commit 2d120a3955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ This guide describes migration to [Playwright Library](./library) and [Playwrigh
| `await browser.createIncognitoBrowserContext(...)` | `await browser.newContext(...)` |
| `await page.setViewport(...)` | `await page.setViewportSize(...)` |
| `await page.waitForXPath(XPathSelector)` | `await page.waitForSelector(XPathSelector)` |
| `await page.waitForNetworkIdle(...)` | `await page.waitForLoadState({ state: 'networkidle' })` |
| `await page.waitForNetworkIdle(...)` | `await page.waitForLoadState('networkidle')` |
| `await page.$eval(...)` | [Assertions](./test-assertions) can often be used instead to verify text, attribute, class... |
| `await page.$(...)` | Discouraged, use [Locators](./api/class-locator) instead |
| `await page.$x(xpath_selector)` | Discouraged, use [Locators](./api/class-locator) instead |