Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: unblock 1.51 dotnet roll (#35016)
Dmitry Gozman9e0be8ee7c9d
diff --git a/docs/src/api/class-pageassertions.md b/docs/src/api/class-pageassertions.mdindex ef8c7d4f6e..6420735f2b 100644--- a/docs/src/api/class-pageassertions.md+++ b/docs/src/api/class-pageassertions.md@@ -336,11 +336,19 @@ await Expect(Page).ToHaveURLAsync(new Regex(".*checkout"));### param: PageAssertions.toHaveURL.url* since: v1.18+* langs: js- `url` <[string]|[RegExp]|[function]\([URL]\):[boolean]>Expected URL string, RegExp, or predicate receiving [URL] to match.When [`option: Browser.newContext.baseURL`] is provided via the context options and the `url` argument is a string, the two values are merged via the [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor and used for the comparison against the current browser URL.+### param: PageAssertions.toHaveURL.urlOrRegExp+* since: v1.18+* langs: csharp, python, java+- `urlOrRegExp` <[string]|[RegExp]>++Expected URL string or RegExp.+### option: PageAssertions.toHaveURL.ignoreCase* since: v1.44- `ignoreCase` <[boolean]>diff --git a/docs/src/api/params.md b/docs/src/api/params.mdindex a31ea6047c..534b638ddd 100644--- a/docs/src/api/params.md+++ b/docs/src/api/params.md@@ -676,13 +676,13 @@ Emulates `'forced-colors'` media feature, supported values are `'active'`, `'non## context-option-contrast* langs: js, java-- `contrast` <null|[ForcedColors]<"no-preference"|"more">>+- `contrast` <null|[Contrast]<"no-preference"|"more">>Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [`method: Page.emulateMedia`] for more details. Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.## context-option-contrast-csharp-python* langs: csharp, python-- `contrast` <[ForcedColors]<"no-preference"|"more"|"null">>+- `contrast` <[Contrast]<"no-preference"|"more"|"null">>Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See [`method: Page.emulateMedia`] for more details. Passing `'null'` resets emulation to system defaults. Defaults to `'no-preference'`.diff --git a/packages/playwright-core/src/server/injected/injectedScript.ts b/packages/playwright-core/src/server/injected/injectedScript.tsindex 547928081d..2ae2f3970e 100644--- a/packages/playwright-core/src/server/injected/injectedScript.ts+++ b/packages/playwright-core/src/server/injected/injectedScript.ts@@ -1422,6 +1422,9 @@ export class InjectedScript {received = getAriaRole(element) || '';} else if (expression === 'to.have.title') {received = this.document.title;+ } else if (expression === 'to.have.url') {+ // Note: this is used by all language ports except for javascript.+ received = this.document.location.href;} else if (expression === 'to.have.value') {element = this.retarget(element, 'follow-label')!;if (element.nodeName !== 'INPUT' && element.nodeName !== 'TEXTAREA' && element.nodeName !== 'SELECT')diff --git a/utils/generate_dotnet_channels.js b/utils/generate_dotnet_channels.jsindex e684751729..979604faf8 100644--- a/utils/generate_dotnet_channels.js+++ b/utils/generate_dotnet_channels.js@@ -190,6 +190,8 @@ for (const [name, item] of Object.entries(protocol)) {} else if (item.type === 'object') {if (Object.keys(item.properties).length === 0)continue;+ if (['AXNode', 'SetNetworkCookie', 'NetworkCookie', 'IndexedDBDatabase', 'SetOriginStorage', 'OriginStorage'].includes(name))+ continue;const init = objectType(item.properties, '', false, name);writeCSharpClass(name, null, init.ts);}