Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions dotnet/docs/api/class-consolemessage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,23 @@ ConsoleMessage.Text

---

### Timestamp {#console-message-timestamp}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.59</font><x-search>consoleMessage.Timestamp</x-search>

The timestamp of the console message in milliseconds since the Unix epoch.

**Usage**

```csharp
ConsoleMessage.Timestamp
```

**Returns**
- [float]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="console-message-timestamp-return"/><a href="#console-message-timestamp-return" class="list-anchor">#</a>

---

### Type {#console-message-type}

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>consoleMessage.Type</x-search>
Expand Down
80 changes: 33 additions & 47 deletions dotnet/docs/aria-snapshots.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ await page.GotoAsync("https://playwright.dev/");
await Expect(page.Locator("banner")).ToMatchAriaSnapshotAsync(@"
- banner:
- heading ""Playwright enables reliable end-to-end testing for modern web apps."" [level=1]
- link ""Get started""
- link ""Star microsoft/playwright on GitHub""
- link ""Get started"":
- /url: /docs/intro
- link ""Star microsoft/playwright on GitHub"":
- /url: https://github.com/microsoft/playwright
- link /[\\d]+k\\+ stargazers on GitHub/
");
```
Expand Down Expand Up @@ -117,9 +119,7 @@ You can perform partial matches on nodes by omitting attributes or accessible na
<button>Submit</button>
```

*aria snapshot*

```yaml
```yaml title="aria snapshot"
- button
```

Expand All @@ -133,9 +133,7 @@ For elements with ARIA attributes like `checked` or `disabled`, omitting these a
<input type="checkbox" checked>
```

*aria snapshot for partial match*

```yaml
```yaml title="aria snapshot (partial match)"
- checkbox
```

Expand All @@ -153,9 +151,7 @@ Similarly, you can partially match children in lists or groups by omitting speci
</ul>
```

*aria snapshot for partial match*

```yaml
```yaml title="aria snapshot (partial match)"
- list
- listitem: Feature B
```
Expand All @@ -174,9 +170,7 @@ By default, a template containing the subset of children will be matched:
</ul>
```

*aria snapshot for partial match*

```yaml
```yaml title="aria snapshot (partial match)"
- list
- listitem: Feature B
```
Expand All @@ -194,9 +188,9 @@ The `/children` property can be used to control how child elements are matched:
</ul>
```

*aria snapshot will fail due to Feature C not being in the template*
Following snapshot will fail due to Feature C not being in the template:

```yaml
```yaml title="aria snapshot"
- list
- /children: equal
- listitem: Feature A
Expand All @@ -211,9 +205,7 @@ Regular expressions allow flexible matching for elements with dynamic or variabl
<h1>Issues 12</h1>
```

*aria snapshot with regular expression*

```yaml
```yaml title="aria snapshot"
- heading /Issues \d+/
```

Expand Down Expand Up @@ -251,9 +243,7 @@ Headings can include a `level` attribute indicating their heading level.
<h2>Subtitle</h2>
```

*aria snapshot*

```yaml
```yaml title="aria snapshot"
- heading "Title" [level=1]
- heading "Subtitle" [level=2]
```
Expand All @@ -266,9 +256,7 @@ Standalone or descriptive text elements appear as text nodes.
<div>Sample accessible name</div>
```

*aria snapshot*

```yaml
```yaml title="aria snapshot"
- text: Sample accessible name
```

Expand All @@ -280,24 +268,32 @@ Multiline text, such as paragraphs, is normalized in the aria snapshot.
<p>Line 1<br>Line 2</p>
```

*aria snapshot*

```yaml
```yaml title="aria snapshot"
- paragraph: Line 1 Line 2
```

### Links

Links display their text or composed content from pseudo-elements.
Links display their text or composed content from pseudo-elements. The link’s destination may be matched using the `/url` property.

```html
<a href="#more-info">Read more about Accessibility</a>
```

*aria snapshot*
```yaml title="aria snapshot"
- link "Read more about Accessibility":
- /url: "#more-info"
```

```yaml
- link "Read more about Accessibility"
The value of `/url` may also be a regular expression:

```html
<a href="https://www.youtube.com/channel/UC46Zj8pDH5tDosqm1gd7WTg">YouTube channel</a>
```

```yaml title="aria snapshot"
- link:
- /url: /https://www.youtube.com/channel/.*/
```

### Text boxes
Expand All @@ -308,9 +304,7 @@ Input elements of type `text` show their `value` attribute content.
<input type="text" value="Enter your name">
```

*aria snapshot*

```yaml
```yaml title="aria snapshot"
- textbox: Enter your name
```

Expand All @@ -325,9 +319,7 @@ Ordered and unordered lists include their list items.
</ul>
```

*aria snapshot*

```yaml
```yaml title="aria snapshot"
- list "Main Features":
- listitem: Feature 1
- listitem: Feature 2
Expand All @@ -344,9 +336,7 @@ Groups capture nested elements, such as `<details>` elements with summary conten
</details>
```

*aria snapshot*

```yaml
```yaml title="aria snapshot"
- group: Summary
```

Expand All @@ -360,9 +350,7 @@ Commonly used ARIA attributes, like `checked`, `disabled`, `expanded`, `level`,
<input type="checkbox" checked>
```

*aria snapshot*

```yaml
```yaml title="aria snapshot"
- checkbox [checked]
```

Expand All @@ -372,9 +360,7 @@ Commonly used ARIA attributes, like `checked`, `disabled`, `expanded`, `level`,
<button aria-pressed="true">Toggle</button>
```

*aria snapshot*

```yaml
```yaml title="aria snapshot"
- button "Toggle" [pressed=true]
```

Expand Down
2 changes: 1 addition & 1 deletion dotnet/docs/release-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ This version was also tested against the following stable channels:
await Expect(Page.GetByRole(AriaRole.Listitem, new() { Name = "Ship v1.52" })).ToContainClassAsync("done");
```

- [Aria Snapshots](./aria-snapshots.mdx) got two new properties: [`/children`](./aria-snapshots.mdx#strict-matching) for strict matching and `/url` for links.
- [Aria Snapshots](./aria-snapshots.mdx) got two new properties: [`/children`](./aria-snapshots.mdx#strict-matching) for strict matching and [`/url`](./aria-snapshots.mdx#links) for links.

```csharp
await Expect(locator).ToMatchAriaSnapshotAsync(@"
Expand Down
17 changes: 17 additions & 0 deletions java/docs/api/class-consolemessage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,23 @@ ConsoleMessage.text();

---

### timestamp {#console-message-timestamp}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.59</font><x-search>consoleMessage.timestamp</x-search>

The timestamp of the console message in milliseconds since the Unix epoch.

**Usage**

```java
ConsoleMessage.timestamp();
```

**Returns**
- [double]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="console-message-timestamp-return"/><a href="#console-message-timestamp-return" class="list-anchor">#</a>

---

### type {#console-message-type}

<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>consoleMessage.type</x-search>
Expand Down
Loading