cherry-pick(#34550): roll follow-ups for .NET and Python
This commit is contained in:
parent
4b7794b37a
commit
67313faaa7
|
|
@ -155,7 +155,7 @@ Additional locator to match.
|
||||||
- returns: <[string]>
|
- returns: <[string]>
|
||||||
|
|
||||||
Captures the aria snapshot of the given element.
|
Captures the aria snapshot of the given element.
|
||||||
Read more about [aria snapshots](../aria-snapshots.md) and [`method: LocatorAssertions.toMatchAriaSnapshot#1`] for the corresponding assertion.
|
Read more about [aria snapshots](../aria-snapshots.md) and [`method: LocatorAssertions.toMatchAriaSnapshot`] for the corresponding assertion.
|
||||||
|
|
||||||
**Usage**
|
**Usage**
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -240,6 +240,24 @@ Expected accessible description.
|
||||||
### option: LocatorAssertions.NotToHaveAccessibleDescription.timeout = %%-csharp-java-python-assertions-timeout-%%
|
### option: LocatorAssertions.NotToHaveAccessibleDescription.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||||
* since: v1.44
|
* since: v1.44
|
||||||
|
|
||||||
|
## async method: LocatorAssertions.NotToHaveAccessibleErrorMessage
|
||||||
|
* since: v1.50
|
||||||
|
* langs: python
|
||||||
|
|
||||||
|
The opposite of [`method: LocatorAssertions.toHaveAccessibleErrorMessage`].
|
||||||
|
|
||||||
|
### param: LocatorAssertions.NotToHaveAccessibleErrorMessage.errorMessage
|
||||||
|
* since: v1.50
|
||||||
|
- `errorMessage` <[string]|[RegExp]>
|
||||||
|
|
||||||
|
Expected accessible error message.
|
||||||
|
|
||||||
|
### option: LocatorAssertions.NotToHaveAccessibleErrorMessage.ignoreCase = %%-assertions-ignore-case-%%
|
||||||
|
* since: v1.50
|
||||||
|
|
||||||
|
### option: LocatorAssertions.NotToHaveAccessibleErrorMessage.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||||
|
* since: v1.50
|
||||||
|
|
||||||
|
|
||||||
## async method: LocatorAssertions.NotToHaveAccessibleName
|
## async method: LocatorAssertions.NotToHaveAccessibleName
|
||||||
* since: v1.44
|
* since: v1.44
|
||||||
|
|
@ -446,7 +464,7 @@ Expected options currently selected.
|
||||||
* since: v1.49
|
* since: v1.49
|
||||||
* langs: python
|
* langs: python
|
||||||
|
|
||||||
The opposite of [`method: LocatorAssertions.toMatchAriaSnapshot#1`].
|
The opposite of [`method: LocatorAssertions.toMatchAriaSnapshot`].
|
||||||
|
|
||||||
### param: LocatorAssertions.NotToMatchAriaSnapshot.expected
|
### param: LocatorAssertions.NotToMatchAriaSnapshot.expected
|
||||||
* since: v1.49
|
* since: v1.49
|
||||||
|
|
@ -2180,7 +2198,7 @@ Expected options currently selected.
|
||||||
* since: v1.23
|
* since: v1.23
|
||||||
|
|
||||||
|
|
||||||
## async method: LocatorAssertions.toMatchAriaSnapshot#1
|
## async method: LocatorAssertions.toMatchAriaSnapshot
|
||||||
* since: v1.49
|
* since: v1.49
|
||||||
* langs:
|
* langs:
|
||||||
- alias-java: matchesAriaSnapshot
|
- alias-java: matchesAriaSnapshot
|
||||||
|
|
@ -2229,14 +2247,14 @@ assertThat(page.locator("body")).matchesAriaSnapshot("""
|
||||||
""");
|
""");
|
||||||
```
|
```
|
||||||
|
|
||||||
### param: LocatorAssertions.toMatchAriaSnapshot#1.expected
|
### param: LocatorAssertions.toMatchAriaSnapshot.expected
|
||||||
* since: v1.49
|
* since: v1.49
|
||||||
- `expected` <string>
|
- `expected` <string>
|
||||||
|
|
||||||
### option: LocatorAssertions.toMatchAriaSnapshot#1.timeout = %%-js-assertions-timeout-%%
|
### option: LocatorAssertions.toMatchAriaSnapshot.timeout = %%-js-assertions-timeout-%%
|
||||||
* since: v1.49
|
* since: v1.49
|
||||||
|
|
||||||
### option: LocatorAssertions.toMatchAriaSnapshot#1.timeout = %%-csharp-java-python-assertions-timeout-%%
|
### option: LocatorAssertions.toMatchAriaSnapshot.timeout = %%-csharp-java-python-assertions-timeout-%%
|
||||||
* since: v1.49
|
* since: v1.49
|
||||||
|
|
||||||
## async method: LocatorAssertions.toMatchAriaSnapshot#2
|
## async method: LocatorAssertions.toMatchAriaSnapshot#2
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ structure of a page, use the [Chrome DevTools Accessibility Pane](https://develo
|
||||||
|
|
||||||
## Snapshot matching
|
## Snapshot matching
|
||||||
|
|
||||||
The [`method: LocatorAssertions.toMatchAriaSnapshot#1`] assertion method in Playwright compares the accessible
|
The [`method: LocatorAssertions.toMatchAriaSnapshot`] assertion method in Playwright compares the accessible
|
||||||
structure of the locator scope with a predefined aria snapshot template, helping validate the page's state against
|
structure of the locator scope with a predefined aria snapshot template, helping validate the page's state against
|
||||||
testing requirements.
|
testing requirements.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ toc_max_heading_level: 2
|
||||||
|
|
||||||
### Aria snapshots
|
### Aria snapshots
|
||||||
|
|
||||||
New assertion [`method: LocatorAssertions.toMatchAriaSnapshot#1`] verifies page structure by comparing to an expected accessibility tree, represented as YAML.
|
New assertion [`method: LocatorAssertions.toMatchAriaSnapshot`] verifies page structure by comparing to an expected accessibility tree, represented as YAML.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
await page.GotoAsync("https://playwright.dev");
|
await page.GotoAsync("https://playwright.dev");
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ toc_max_heading_level: 2
|
||||||
|
|
||||||
### Aria snapshots
|
### Aria snapshots
|
||||||
|
|
||||||
New assertion [`method: LocatorAssertions.toMatchAriaSnapshot#1`] verifies page structure by comparing to an expected accessibility tree, represented as YAML.
|
New assertion [`method: LocatorAssertions.toMatchAriaSnapshot`] verifies page structure by comparing to an expected accessibility tree, represented as YAML.
|
||||||
|
|
||||||
```java
|
```java
|
||||||
page.navigate("https://playwright.dev");
|
page.navigate("https://playwright.dev");
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ This version was also tested against the following stable channels:
|
||||||
|
|
||||||
### Aria snapshots
|
### Aria snapshots
|
||||||
|
|
||||||
New assertion [`method: LocatorAssertions.toMatchAriaSnapshot#1`] verifies page structure by comparing to an expected accessibility tree, represented as YAML.
|
New assertion [`method: LocatorAssertions.toMatchAriaSnapshot`] verifies page structure by comparing to an expected accessibility tree, represented as YAML.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
await page.goto('https://playwright.dev');
|
await page.goto('https://playwright.dev');
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ toc_max_heading_level: 2
|
||||||
|
|
||||||
### Aria snapshots
|
### Aria snapshots
|
||||||
|
|
||||||
New assertion [`method: LocatorAssertions.toMatchAriaSnapshot#1`] verifies page structure by comparing to an expected accessibility tree, represented as YAML.
|
New assertion [`method: LocatorAssertions.toMatchAriaSnapshot`] verifies page structure by comparing to an expected accessibility tree, represented as YAML.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
page.goto("https://playwright.dev")
|
page.goto("https://playwright.dev")
|
||||||
|
|
|
||||||
|
|
@ -263,7 +263,7 @@ See the [guides for CI providers](./ci.md) to deploy your tests to CI/CD.
|
||||||
## Async Fixtures
|
## Async Fixtures
|
||||||
|
|
||||||
If you want to use async fixtures, you can use the [`pytest-playwright-asyncio`](https://pypi.org/project/pytest-playwright-asyncio/) plugin.
|
If you want to use async fixtures, you can use the [`pytest-playwright-asyncio`](https://pypi.org/project/pytest-playwright-asyncio/) plugin.
|
||||||
Make sure to use `pytest-asyncio>=0.24.0` and make your tests use of [`loop_scope=sesion`](https://pytest-asyncio.readthedocs.io/en/latest/how-to-guides/run_session_tests_in_same_loop.html).
|
Make sure to use `pytest-asyncio>=0.24.0` and make your tests use of [`loop_scope=session`](https://pytest-asyncio.readthedocs.io/en/latest/how-to-guides/run_session_tests_in_same_loop.html).
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import pytest
|
import pytest
|
||||||
|
|
|
||||||
2
packages/playwright-core/types/types.d.ts
vendored
2
packages/playwright-core/types/types.d.ts
vendored
|
|
@ -12429,7 +12429,7 @@ export interface Locator {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Captures the aria snapshot of the given element. Read more about [aria snapshots](https://playwright.dev/docs/aria-snapshots) and
|
* Captures the aria snapshot of the given element. Read more about [aria snapshots](https://playwright.dev/docs/aria-snapshots) and
|
||||||
* [expect(locator).toMatchAriaSnapshot(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-match-aria-snapshot-1)
|
* [expect(locator).toMatchAriaSnapshot(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-match-aria-snapshot)
|
||||||
* for the corresponding assertion.
|
* for the corresponding assertion.
|
||||||
*
|
*
|
||||||
* **Usage**
|
* **Usage**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue