Package com.microsoft.playwright
Class Frame.WaitForNavigationOptions
- java.lang.Object
-
- com.microsoft.playwright.Frame.WaitForNavigationOptions
-
-
Field Summary
Fields Modifier and Type Field Description DoubletimeoutMaximum operation time in milliseconds, defaults to 30 seconds, pass0to disable timeout.ObjecturlA glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.WaitUntilStatewaitUntilWhen to consider operation succeeded, defaults toload.
-
Constructor Summary
Constructors Constructor Description WaitForNavigationOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Frame.WaitForNavigationOptionssetTimeout(double timeout)Maximum operation time in milliseconds, defaults to 30 seconds, pass0to disable timeout.Frame.WaitForNavigationOptionssetUrl(String url)A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.Frame.WaitForNavigationOptionssetUrl(Predicate<String> url)A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.Frame.WaitForNavigationOptionssetUrl(Pattern url)A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.Frame.WaitForNavigationOptionssetWaitUntil(WaitUntilState waitUntil)When to consider operation succeeded, defaults toload.
-
-
-
Field Detail
-
timeout
public Double timeout
Maximum operation time in milliseconds, defaults to 30 seconds, pass0to disable timeout. The default value can be changed by using theBrowserContext.setDefaultNavigationTimeout(),BrowserContext.setDefaultTimeout(),Page.setDefaultNavigationTimeout()orPage.setDefaultTimeout()methods.
-
url
public Object url
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string.
-
waitUntil
public WaitUntilState waitUntil
When to consider operation succeeded, defaults toload. Events can be either:-
"domcontentloaded"- consider operation to be finished when theDOMContentLoadedevent is fired. -
"load"- consider operation to be finished when theloadevent is fired. -
"networkidle"- **DISCOURAGED** consider operation to be finished when there are no network connections for at least500ms. Don't use this method for testing, rely on web assertions to assess readiness instead. -
"commit"- consider operation to be finished when network response is received and the document started loading.
-
-
-
Method Detail
-
setTimeout
public Frame.WaitForNavigationOptions setTimeout(double timeout)
Maximum operation time in milliseconds, defaults to 30 seconds, pass0to disable timeout. The default value can be changed by using theBrowserContext.setDefaultNavigationTimeout(),BrowserContext.setDefaultTimeout(),Page.setDefaultNavigationTimeout()orPage.setDefaultTimeout()methods.
-
setUrl
public Frame.WaitForNavigationOptions setUrl(String url)
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string.
-
setUrl
public Frame.WaitForNavigationOptions setUrl(Pattern url)
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string.
-
setUrl
public Frame.WaitForNavigationOptions setUrl(Predicate<String> url)
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string.
-
setWaitUntil
public Frame.WaitForNavigationOptions setWaitUntil(WaitUntilState waitUntil)
When to consider operation succeeded, defaults toload. Events can be either:-
"domcontentloaded"- consider operation to be finished when theDOMContentLoadedevent is fired. -
"load"- consider operation to be finished when theloadevent is fired. -
"networkidle"- **DISCOURAGED** consider operation to be finished when there are no network connections for at least500ms. Don't use this method for testing, rely on web assertions to assess readiness instead. -
"commit"- consider operation to be finished when network response is received and the document started loading.
-
-
-