| Package | Description |
|---|---|
| com.microsoft.playwright | |
| com.microsoft.playwright.options |
| Modifier and Type | Field and Description |
|---|---|
Predicate<Page> |
Page.WaitForPopupOptions.predicate
Receives the
Page object and resolves to truthy value when the waiting should resolve. |
Predicate<Page> |
BrowserContext.WaitForPageOptions.predicate
Receives the
Page object and resolves to truthy value when the waiting should resolve. |
| Modifier and Type | Method and Description |
|---|---|
Page |
BrowserContext.newPage()
Creates a new page in the browser context.
|
default Page |
Browser.newPage()
Creates a new page in a new browser context.
|
Page |
Browser.newPage(Browser.NewPageOptions options)
Creates a new page in a new browser context.
|
Page |
Page.opener()
Returns the opener for popup pages and
null for others. |
Page |
FileChooser.page()
Returns page this file chooser belongs to.
|
Page |
Frame.page()
Returns the page containing this frame.
|
Page |
Page.waitForClose(Page.WaitForCloseOptions options,
Runnable callback)
Performs action and waits for the Page to close.
|
default Page |
Page.waitForClose(Runnable callback)
Performs action and waits for the Page to close.
|
Page |
BrowserContext.waitForPage(BrowserContext.WaitForPageOptions options,
Runnable callback)
Performs action and waits for a new
Page to be created in the context. |
default Page |
BrowserContext.waitForPage(Runnable callback)
Performs action and waits for a new
Page to be created in the context. |
Page |
Page.waitForPopup(Page.WaitForPopupOptions options,
Runnable callback)
Performs action and waits for a popup
Page. |
default Page |
Page.waitForPopup(Runnable callback)
Performs action and waits for a popup
Page. |
| Modifier and Type | Method and Description |
|---|---|
List<Page> |
BrowserContext.pages()
Returns all open pages in the context.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
Browser.startTracing(Page page)
NOTE: Tracing is only supported on Chromium-based browsers.
|
void |
Browser.startTracing(Page page,
Browser.StartTracingOptions options)
NOTE: Tracing is only supported on Chromium-based browsers.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Page.offClose(Consumer<Page> handler)
Removes handler that was previously added with
onClose(handler). |
void |
Page.offCrash(Consumer<Page> handler)
Removes handler that was previously added with
onCrash(handler). |
void |
Page.offDOMContentLoaded(Consumer<Page> handler)
Removes handler that was previously added with
onDOMContentLoaded(handler). |
void |
Page.offLoad(Consumer<Page> handler)
Removes handler that was previously added with
onLoad(handler). |
void |
BrowserContext.offPage(Consumer<Page> handler)
Removes handler that was previously added with
onPage(handler). |
void |
Page.offPopup(Consumer<Page> handler)
Removes handler that was previously added with
onPopup(handler). |
void |
Page.onClose(Consumer<Page> handler)
Emitted when the page closes.
|
void |
Page.onCrash(Consumer<Page> handler)
Emitted when the page crashes.
|
void |
Page.onDOMContentLoaded(Consumer<Page> handler)
Emitted when the JavaScript
DOMContentLoaded event is dispatched. |
void |
Page.onLoad(Consumer<Page> handler)
Emitted when the JavaScript
load event is
dispatched. |
void |
BrowserContext.onPage(Consumer<Page> handler)
The event is emitted when a new Page is created in the BrowserContext.
|
void |
Page.onPopup(Consumer<Page> handler)
Emitted when the page opens a new tab or window.
|
Page.WaitForPopupOptions |
Page.WaitForPopupOptions.setPredicate(Predicate<Page> predicate) |
BrowserContext.WaitForPageOptions |
BrowserContext.WaitForPageOptions.setPredicate(Predicate<Page> predicate) |
| Modifier and Type | Method and Description |
|---|---|
Page |
BindingCallback.Source.page() |
Copyright © 2021. All rights reserved.