Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

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

Yury Semikhatskyd3c71cc2073d
diff --git a/docs/src/api/params.md b/docs/src/api/params.md
index 3a1021f9cd..0a7dfbf708 100644
--- a/docs/src/api/params.md
+++ b/docs/src/api/params.md
@@ -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
diff --git a/types/types.d.ts b/types/types.d.ts
index 67a4ae6b60..2ec4db13c0 100644
--- a/types/types.d.ts
+++ b/types/types.d.ts
@@ -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?: {