diff --git a/docs/src/api/class-pageassertions.md b/docs/src/api/class-pageassertions.md index b813fc4141..38a05b9df8 100644 --- a/docs/src/api/class-pageassertions.md +++ b/docs/src/api/class-pageassertions.md @@ -323,9 +323,9 @@ expect(page).to_have_url(re.compile(".*checkout")) await Expect(Page).ToHaveURLAsync(new Regex(".*checkout")); ``` -### param: PageAssertions.toHaveURL.urlRegExOrPredicate +### param: PageAssertions.toHaveURL.url * since: v1.18 -- `urlRegExOrPredicate` <[string]|[RegExp]|[function]\([URL]\):[boolean]> +- `url` <[string]|[RegExp]|[function]\([URL]\):[boolean]> Expected URL string, RegExp, or predicate receiving [URL] to match. When a [`option: Browser.newContext.baseURL`] via the context options was provided and the passed URL is a path, it gets merged via the [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. @@ -334,7 +334,7 @@ When a [`option: Browser.newContext.baseURL`] via the context options was provid * since: v1.44 - `ignoreCase` <[boolean]> -Whether to perform case-insensitive match. [`option: ignoreCase`] option takes precedence over the corresponding regular expression parameter if specified. The predicate parameter ignores this flag. +Whether to perform case-insensitive match. [`option: ignoreCase`] option takes precedence over the corresponding regular expression parameter if specified. A provided predicate ignores this flag. ### option: PageAssertions.toHaveURL.timeout = %%-js-assertions-timeout-%% * since: v1.18 diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.ts index bc0ee76a23..29f3d85e75 100644 --- a/packages/playwright/types/test.d.ts +++ b/packages/playwright/types/test.d.ts @@ -8800,17 +8800,17 @@ interface PageAssertions { * await expect(page).toHaveURL(/.*checkout/); * ``` * - * @param urlRegExOrPredicate Expected URL string, RegExp, or predicate receiving [URL] to match. When a + * @param url Expected URL string, RegExp, or predicate receiving [URL] to match. When a * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context * options was provided and the passed URL is a path, it gets merged via the * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. * @param options */ - toHaveURL(urlRegExOrPredicate: string|RegExp|((url: URL) => boolean), options?: { + toHaveURL(url: string|RegExp|((url: URL) => boolean), options?: { /** * Whether to perform case-insensitive match. * [`ignoreCase`](https://playwright.dev/docs/api/class-pageassertions#page-assertions-to-have-url-option-ignore-case) - * option takes precedence over the corresponding regular expression parameter if specified. The predicate parameter + * option takes precedence over the corresponding regular expression parameter if specified. A provided predicate * ignores this flag. */ ignoreCase?: boolean;