Skip to content

Commit 9e0be8e

Browse files
authored
chore: unblock 1.51 dotnet roll (#35016)
1 parent 54582c1 commit 9e0be8e

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

docs/src/api/class-pageassertions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,19 @@ await Expect(Page).ToHaveURLAsync(new Regex(".*checkout"));
336336

337337
### param: PageAssertions.toHaveURL.url
338338
* since: v1.18
339+
* langs: js
339340
- `url` <[string]|[RegExp]|[function]\([URL]\):[boolean]>
340341

341342
Expected URL string, RegExp, or predicate receiving [URL] to match.
342343
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.
343344

345+
### param: PageAssertions.toHaveURL.urlOrRegExp
346+
* since: v1.18
347+
* langs: csharp, python, java
348+
- `urlOrRegExp` <[string]|[RegExp]>
349+
350+
Expected URL string or RegExp.
351+
344352
### option: PageAssertions.toHaveURL.ignoreCase
345353
* since: v1.44
346354
- `ignoreCase` <[boolean]>

docs/src/api/params.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,13 +676,13 @@ Emulates `'forced-colors'` media feature, supported values are `'active'`, `'non
676676

677677
## context-option-contrast
678678
* langs: js, java
679-
- `contrast` <null|[ForcedColors]<"no-preference"|"more">>
679+
- `contrast` <null|[Contrast]<"no-preference"|"more">>
680680

681681
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'`.
682682

683683
## context-option-contrast-csharp-python
684684
* langs: csharp, python
685-
- `contrast` <[ForcedColors]<"no-preference"|"more"|"null">>
685+
- `contrast` <[Contrast]<"no-preference"|"more"|"null">>
686686

687687
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'`.
688688

packages/playwright-core/src/server/injected/injectedScript.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,6 +1422,9 @@ export class InjectedScript {
14221422
received = getAriaRole(element) || '';
14231423
} else if (expression === 'to.have.title') {
14241424
received = this.document.title;
1425+
} else if (expression === 'to.have.url') {
1426+
// Note: this is used by all language ports except for javascript.
1427+
received = this.document.location.href;
14251428
} else if (expression === 'to.have.value') {
14261429
element = this.retarget(element, 'follow-label')!;
14271430
if (element.nodeName !== 'INPUT' && element.nodeName !== 'TEXTAREA' && element.nodeName !== 'SELECT')

utils/generate_dotnet_channels.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ for (const [name, item] of Object.entries(protocol)) {
190190
} else if (item.type === 'object') {
191191
if (Object.keys(item.properties).length === 0)
192192
continue;
193+
if (['AXNode', 'SetNetworkCookie', 'NetworkCookie', 'IndexedDBDatabase', 'SetOriginStorage', 'OriginStorage'].includes(name))
194+
continue;
193195
const init = objectType(item.properties, '', false, name);
194196
writeCSharpClass(name, null, init.ts);
195197
}

0 commit comments

Comments
 (0)