docs: describe playwright.create in java (#5566)

This commit is contained in:
Yury Semikhatsky 2021-02-23 16:43:37 -08:00 committed by GitHub
parent dc3fd3f6b3
commit ec9a53495a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,20 @@
Terminates this instance of Playwright, will also close all created browsers if they are still running. Terminates this instance of Playwright, will also close all created browsers if they are still running.
## method: Playwright.create
* langs: java
- returns: <[Playwright]>
Launches new Playwright driver process and connects to it. [`method: Playwright.close`] should be called when the instance is no longer needed.
```java
Playwright playwright = Playwright.create()) {
Browser browser = playwright.webkit().launch();
Page page = browser.newPage();
page.navigate("https://www.w3.org/");
playwright.close();
```
### param: BrowserContext.waitForPage.callback = %%-java-wait-for-event-callback-%% ### param: BrowserContext.waitForPage.callback = %%-java-wait-for-event-callback-%%
### param: Frame.waitForNavigation.callback = %%-java-wait-for-event-callback-%% ### param: Frame.waitForNavigation.callback = %%-java-wait-for-event-callback-%%