You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dotnet/docs/actionability.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ Playwright includes auto-retrying assertions that remove flakiness by waiting un
66
66
|[Expect(Locator).ToHaveAttributeAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-attribute)| Element has a DOM attribute |
67
67
|[Expect(Locator).ToHaveClassAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-class)| Element has a class property |
68
68
|[Expect(Locator).ToHaveCountAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-count)| List has exact number of children |
69
-
|[Expect(Locator).ToHaveCSSAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-css-1)| Element has CSS property |
69
+
|[Expect(Locator).ToHaveCSSAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-css)| Element has CSS property |
70
70
|[Expect(Locator).ToHaveIdAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-id)| Element has an ID |
71
71
|[Expect(Locator).ToHaveJSPropertyAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-js-property)| Element has a JavaScript property |
72
72
|[Expect(Locator).ToHaveTextAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-text)| Element matches text |
Whether to pass the argument as a handle, instead of passing by value. When passing a handle, only one argument is supported. When passing by value, multiple arguments are supported.
Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.SetDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.SetDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods.
Returns a code string for a locator that uses best practices for referencing the matched element, prioritizing test ids, aria roles, and other user-facing attributes over CSS selectors.
Whether to pass the argument as a handle, instead of passing by value. When passing a handle, only one argument is supported. When passing by value, multiple arguments are supported.
Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.SetDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.SetDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods.
When specified, enables incremental snapshots. Subsequent calls with the same track name will return an incremental snapshot containing only changes since the last call.
Incremental snapshot containing only changes since the last tracked snapshot, when using the [Track](/api/class-page.mdx#page-snapshot-for-ai-option-track) option.
2577
+
2578
+
---
2579
+
2542
2580
### TitleAsync {#page-title}
2543
2581
2544
2582
<fontsize="2"style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>page.TitleAsync</x-search>
When enabled, the trace is written to an unarchived file that is updated in real time as actions occur, instead of caching changes and archiving them into a zip file at the end. This is useful for live trace viewing during test execution.
If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the [TracesDir](/api/class-browsertype.mdx#browser-type-launch-option-traces-dir) directory specified in [BrowserType.LaunchAsync()](/api/class-browsertype.mdx#browser-type-launch). To specify the final trace zip file name, you need to pass `path` option to [Tracing.StopAsync()](/api/class-tracing.mdx#tracing-stop) instead.
Copy file name to clipboardExpand all lines: dotnet/docs/aria-snapshots.mdx
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,6 +197,12 @@ Following snapshot will fail due to Feature C not being in the template:
197
197
- listitem: Feature B
198
198
```
199
199
200
+
#### Setting `children` mode globally
201
+
202
+
Instead of adding a `/children` property to every snapshot, you can set the default children matching mode for all `toMatchAriaSnapshot` calls in the configuration file:
203
+
204
+
Individual snapshots can still override the global setting by including an explicit `/children` property in the template.
205
+
200
206
### Matching with regular expressions
201
207
202
208
Regular expressions allow flexible matching for elements with dynamic or variable text. Accessible names and text can support regex patterns.
Copy file name to clipboardExpand all lines: dotnet/docs/test-assertions.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ import HTMLCard from '@site/src/components/HTMLCard';
27
27
|[Expect(Locator).ToHaveAttributeAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-attribute)| Element has a DOM attribute |
28
28
|[Expect(Locator).ToHaveClassAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-class)| Element has a class property |
29
29
|[Expect(Locator).ToHaveCountAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-count)| List has exact number of children |
30
-
|[Expect(Locator).ToHaveCSSAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-css-1)| Element has CSS property |
30
+
|[Expect(Locator).ToHaveCSSAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-css)| Element has CSS property |
31
31
|[Expect(Locator).ToHaveIdAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-id)| Element has an ID |
32
32
|[Expect(Locator).ToHaveJSPropertyAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-js-property)| Element has a JavaScript property |
33
33
|[Expect(Locator).ToHaveRoleAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-have-role)| Element has a specific [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles)|
0 commit comments