Skip to content

Commit

Permalink
docs: describe playwright.create in java (#5566) (#5666)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored Mar 1, 2021
1 parent 6b4d528 commit 5d275f1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/src/api/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@

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: Frame.waitForNavigation.callback = %%-java-wait-for-event-callback-%%
Expand Down

0 comments on commit 5d275f1

Please sign in to comment.