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

This commit is contained in:
Yury Semikhatsky 2021-03-01 13:35:08 -08:00 committed by GitHub
parent 6b4d528ff9
commit 5d275f10a2
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-%%