docs: clarify waitForURL(string) behavior (#8952)

This commit is contained in:
Yury Semikhatsky 2021-09-17 01:34:49 -07:00 committed by GitHub
parent 44b4c2f792
commit d3c71cc207
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 5 deletions

View file

@ -549,7 +549,9 @@ is considered matching if all specified properties match.
## wait-for-navigation-url
- `url` <[string]|[RegExp]|[function]\([URL]\):[boolean]>
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.
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 wilcard characters, the method will wait for navigation to URL that is exactly
equal to the string.
## wait-for-event-event
* langs: js, python, java

14
types/types.d.ts vendored
View file

@ -3627,7 +3627,9 @@ export interface Page {
timeout?: number;
/**
* A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.
* 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 wilcard characters, the method will wait for navigation to URL that is exactly equal to
* the string.
*/
url?: string|RegExp|((url: URL) => boolean);
@ -3738,7 +3740,8 @@ export interface Page {
*
* Shortcut for main frame's
* [frame.waitForURL(url[, options])](https://playwright.dev/docs/api/class-frame#frame-wait-for-url).
* @param url A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.
* @param 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 wilcard characters, the method will wait for navigation to URL that is exactly equal to
* the string.
* @param options
*/
waitForURL(url: string|RegExp|((url: URL) => boolean), options?: {
@ -5745,7 +5748,9 @@ export interface Frame {
timeout?: number;
/**
* A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.
* 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 wilcard characters, the method will wait for navigation to URL that is exactly equal to
* the string.
*/
url?: string|RegExp|((url: URL) => boolean);
@ -5775,7 +5780,8 @@ export interface Frame {
* await frame.waitForURL('**\/target.html');
* ```
*
* @param url A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.
* @param 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 wilcard characters, the method will wait for navigation to URL that is exactly equal to
* the string.
* @param options
*/
waitForURL(url: string|RegExp|((url: URL) => boolean), options?: {