Update class-page.md (#27750)
This commit is contained in:
parent
778047facc
commit
89e0978da4
|
|
@ -599,7 +599,7 @@ from playwright.async_api import async_playwright, Playwright
|
||||||
|
|
||||||
async def run(playwright: Playwright):
|
async def run(playwright: Playwright):
|
||||||
webkit = playwright.webkit
|
webkit = playwright.webkit
|
||||||
browser = await webkit.launch(headless=false)
|
browser = await webkit.launch(headless=False)
|
||||||
context = await browser.new_context()
|
context = await browser.new_context()
|
||||||
await context.expose_binding("pageURL", lambda source: source["page"].url)
|
await context.expose_binding("pageURL", lambda source: source["page"].url)
|
||||||
page = await context.new_page()
|
page = await context.new_page()
|
||||||
|
|
@ -625,7 +625,7 @@ from playwright.sync_api import sync_playwright, Playwright
|
||||||
|
|
||||||
def run(playwright: Playwright):
|
def run(playwright: Playwright):
|
||||||
webkit = playwright.webkit
|
webkit = playwright.webkit
|
||||||
browser = webkit.launch(headless=false)
|
browser = webkit.launch(headless=False)
|
||||||
context = browser.new_context()
|
context = browser.new_context()
|
||||||
context.expose_binding("pageURL", lambda source: source["page"].url)
|
context.expose_binding("pageURL", lambda source: source["page"].url)
|
||||||
page = context.new_page()
|
page = context.new_page()
|
||||||
|
|
|
||||||
|
|
@ -1736,7 +1736,7 @@ from playwright.async_api import async_playwright, Playwright
|
||||||
|
|
||||||
async def run(playwright: Playwright):
|
async def run(playwright: Playwright):
|
||||||
webkit = playwright.webkit
|
webkit = playwright.webkit
|
||||||
browser = await webkit.launch(headless=false)
|
browser = await webkit.launch(headless=False)
|
||||||
context = await browser.new_context()
|
context = await browser.new_context()
|
||||||
page = await context.new_page()
|
page = await context.new_page()
|
||||||
await page.expose_binding("pageURL", lambda source: source["page"].url)
|
await page.expose_binding("pageURL", lambda source: source["page"].url)
|
||||||
|
|
@ -1762,7 +1762,7 @@ from playwright.sync_api import sync_playwright, Playwright
|
||||||
|
|
||||||
def run(playwright: Playwright):
|
def run(playwright: Playwright):
|
||||||
webkit = playwright.webkit
|
webkit = playwright.webkit
|
||||||
browser = webkit.launch(headless=false)
|
browser = webkit.launch(headless=False)
|
||||||
context = browser.new_context()
|
context = browser.new_context()
|
||||||
page = context.new_page()
|
page = context.new_page()
|
||||||
page.expose_binding("pageURL", lambda source: source["page"].url)
|
page.expose_binding("pageURL", lambda source: source["page"].url)
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ public class App {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
By default, Playwright runs the browsers in headless mode. To see the browser UI, pass the `headless=false` flag while launching the browser. You can also use [`option: slowMo`] to slow down execution. Learn more in the debugging tools [section](./debug.md).
|
By default, Playwright runs the browsers in headless mode. To see the browser UI, pass the `setHeadless(false)` flag while launching the browser. You can also use [`option: slowMo`] to slow down execution. Learn more in the debugging tools [section](./debug.md).
|
||||||
|
|
||||||
```java
|
```java
|
||||||
playwright.firefox().launch(new BrowserType.LaunchOptions().setHeadless(false).setSlowMo(50));
|
playwright.firefox().launch(new BrowserType.LaunchOptions().setHeadless(false).setSlowMo(50));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue