Skip to content

Commit

Permalink
feat(roll): roll to ToT Playwright (23-07-24) (#1446)
Browse files Browse the repository at this point in the history
  • Loading branch information
playwrightmachine authored Jul 23, 2024
1 parent fd956a2 commit 5ec8a35
Show file tree
Hide file tree
Showing 40 changed files with 65 additions and 69 deletions.
1 change: 0 additions & 1 deletion dotnet/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ await BrowserContext.GrantPermissionsAsync(permissions, options);
* `'notifications'`
* `'payment-handler'`
* `'storage-access'`
* `'window-management'`
- `options` `BrowserContextGrantPermissionsOptions?` *(optional)*
- `Origin` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-grant-permissions-option-origin"/><a href="#browser-context-grant-permissions-option-origin" class="list-anchor">#</a>

Expand Down
2 changes: 1 addition & 1 deletion dotnet/docs/api/class-frame.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ await Frame.AddScriptTagAsync(options);
Path to the JavaScript file to be injected into frame. If `path` is a relative path, then it is resolved relative to the current working directory.
- `Type` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-add-script-tag-option-type"/><a href="#frame-add-script-tag-option-type" class="list-anchor">#</a>

Script type. Use 'module' in order to load a Javascript ES6 module. See [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.
Script type. Use 'module' in order to load a JavaScript ES6 module. See [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.
- `Url` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-add-script-tag-option-url"/><a href="#frame-add-script-tag-option-url" class="list-anchor">#</a>

URL of a script to be added.
Expand Down
6 changes: 3 additions & 3 deletions dotnet/docs/api/class-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ await Page.AddScriptTagAsync(options);
Path to the JavaScript file to be injected into frame. If `path` is a relative path, then it is resolved relative to the current working directory.
- `Type` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-add-script-tag-option-type"/><a href="#page-add-script-tag-option-type" class="list-anchor">#</a>

Script type. Use 'module' in order to load a Javascript ES6 module. See [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.
Script type. Use 'module' in order to load a JavaScript ES6 module. See [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.
- `Url` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-add-script-tag-option-url"/><a href="#page-add-script-tag-option-url" class="list-anchor">#</a>

URL of a script to be added.
Expand Down Expand Up @@ -1095,7 +1095,7 @@ await Expect(Page.GetByTitle("Issues count")).toHaveText("25 issues");

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

Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If can not go back, returns `null`.
Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If cannot go back, returns `null`.

Navigate to the previous page in history.

Expand Down Expand Up @@ -1127,7 +1127,7 @@ await Page.GoBackAsync(options);

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

Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If can not go forward, returns `null`.
Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If cannot go forward, returns `null`.

Navigate to the next page in history.

Expand Down
2 changes: 1 addition & 1 deletion dotnet/docs/api/class-pageassertions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace PlaywrightTests;
public class ExampleTests : PageTest
{
[TestMethod]
public async Task NavigatetoLoginPage()
public async Task NavigateToLoginPage()
{
await Page.GetByRole(AriaRole.Button, new() { Name = "Sign In" }).ClickAsync();
await Expect(Page).ToHaveURLAsync(new Regex(".*/login"));
Expand Down
2 changes: 1 addition & 1 deletion dotnet/docs/api/class-request.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Here is an example that handles all the cases:

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

Returns the value of the header matching the name. The name is case insensitive.
Returns the value of the header matching the name. The name is case-insensitive.

**Usage**

Expand Down
4 changes: 2 additions & 2 deletions dotnet/docs/api/class-response.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Response.FromServiceWorker

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

Returns the value of the header matching the name. The name is case insensitive. If multiple headers have the same name (except `set-cookie`), they are returned as a list separated by `, `. For `set-cookie`, the `\n` separator is used. If no headers are found, `null` is returned.
Returns the value of the header matching the name. The name is case-insensitive. If multiple headers have the same name (except `set-cookie`), they are returned as a list separated by `, `. For `set-cookie`, the `\n` separator is used. If no headers are found, `null` is returned.

**Usage**

Expand All @@ -125,7 +125,7 @@ await Response.HeaderValueAsync(name);

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

Returns all values of the headers matching the name, for example `set-cookie`. The name is case insensitive.
Returns all values of the headers matching the name, for example `set-cookie`. The name is case-insensitive.

**Usage**

Expand Down
2 changes: 1 addition & 1 deletion dotnet/docs/auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Redoing login for every test can slow down test execution. To mitigate that, reu

Playwright provides a way to reuse the signed-in state in the tests. That way you can log in only once and then skip the log in step for all of the tests.

Web apps use cookie-based or token-based authentication, where authenticated state is stored as [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies) or in [local storage](https://developer.mozilla.org/en-US/docs/Web/API/Storage). Playwright provides [BrowserContext.StorageStateAsync()](/api/class-browsercontext.mdx#browser-context-storage-state) method that can be used to retrieve storage state from authenticated contexts and then create new contexts with pre-populated state.
Web apps use cookie-based or token-based authentication, where authenticated state is stored as [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies) or in [local storage](https://developer.mozilla.org/en-US/docs/Web/API/Storage). Playwright provides [BrowserContext.StorageStateAsync()](/api/class-browsercontext.mdx#browser-context-storage-state) method that can be used to retrieve storage state from authenticated contexts and then create new contexts with prepopulated state.

Cookies and local storage state can be used across different browsers. They depend on your application's authentication model: some apps might require both cookies and local storage.

Expand Down
2 changes: 1 addition & 1 deletion dotnet/docs/browsers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ pwsh bin/Debug/netX/playwright.ps1 install

Playwright downloads Chromium, WebKit and Firefox browsers into the OS-specific cache folders:
- `%USERPROFILE%\AppData\Local\ms-playwright` on Windows
- `~/Library/Caches/ms-playwright` on MacOS
- `~/Library/Caches/ms-playwright` on macOS
- `~/.cache/ms-playwright` on Linux

These browsers will take a few hundred megabytes of disk space when installed:
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 @@ -914,7 +914,7 @@ Read more in [our documentation](./test-assertions).
- [Locator.HighlightAsync()](/api/class-locator.mdx#locator-highlight) visually reveals element(s) for easier debugging.
### Announcements
- v1.20 is the last release to receive WebKit update for macOS 10.15 Catalina. Please update MacOS to keep using latest & greatest WebKit!
- v1.20 is the last release to receive WebKit update for macOS 10.15 Catalina. Please update macOS to keep using latest & greatest WebKit!
### Browser Versions
- Chromium 101.0.4921.0
Expand Down
2 changes: 1 addition & 1 deletion java/docs/accessibility-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ If the element in question is used repeatedly in many pages, consider [using a t
### Disabling individual scan rules
If your application contains many different pre-existing violations of a specific rule, you can use [`AxeBuilder.disableRules()`](https://github.com/dequelabs/axe-core-maven-html/blob/develop/playwright/README.md#axebuilderdisablerulesliststring-rules) to temporarily disable individual rules until you're able to fix the issues.
If your application contains many different preexisting violations of a specific rule, you can use [`AxeBuilder.disableRules()`](https://github.com/dequelabs/axe-core-maven-html/blob/develop/playwright/README.md#axebuilderdisablerulesliststring-rules) to temporarily disable individual rules until you're able to fix the issues.
You can find the rule IDs to pass to `disableRules()` in the `id` property of the violations you want to suppress. A [complete list of axe's rules](https://github.com/dequelabs/axe-core/blob/master/doc/rule-descriptions.md) can be found in `axe-core`'s documentation.
Expand Down
1 change: 0 additions & 1 deletion java/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ BrowserContext.grantPermissions(permissions, options);
* `'notifications'`
* `'payment-handler'`
* `'storage-access'`
* `'window-management'`
- `options` `BrowserContext.GrantPermissionsOptions` *(optional)*
- `setOrigin` [String] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-grant-permissions-option-origin"/><a href="#browser-context-grant-permissions-option-origin" class="list-anchor">#</a>

Expand Down
2 changes: 1 addition & 1 deletion java/docs/api/class-frame.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Frame.addScriptTag(options);
Path to the JavaScript file to be injected into frame. If `path` is a relative path, then it is resolved relative to the current working directory.
- `setType` [String] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-add-script-tag-option-type"/><a href="#frame-add-script-tag-option-type" class="list-anchor">#</a>

Script type. Use 'module' in order to load a Javascript ES6 module. See [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.
Script type. Use 'module' in order to load a JavaScript ES6 module. See [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.
- `setUrl` [String] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-add-script-tag-option-url"/><a href="#frame-add-script-tag-option-url" class="list-anchor">#</a>

URL of a script to be added.
Expand Down
6 changes: 3 additions & 3 deletions java/docs/api/class-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Page.addScriptTag(options);
Path to the JavaScript file to be injected into frame. If `path` is a relative path, then it is resolved relative to the current working directory.
- `setType` [String] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-add-script-tag-option-type"/><a href="#page-add-script-tag-option-type" class="list-anchor">#</a>

Script type. Use 'module' in order to load a Javascript ES6 module. See [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.
Script type. Use 'module' in order to load a JavaScript ES6 module. See [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.
- `setUrl` [String] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-add-script-tag-option-url"/><a href="#page-add-script-tag-option-url" class="list-anchor">#</a>

URL of a script to be added.
Expand Down Expand Up @@ -1093,7 +1093,7 @@ assertThat(page.getByTitle("Issues count")).hasText("25 issues");

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

Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If can not go back, returns `null`.
Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If cannot go back, returns `null`.

Navigate to the previous page in history.

Expand Down Expand Up @@ -1126,7 +1126,7 @@ Page.goBack(options);
<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>page.goForward</x-search>
Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If can not go forward, returns `null`.
Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If cannot go forward, returns `null`.
Navigate to the next page in history.
Expand Down
2 changes: 1 addition & 1 deletion java/docs/api/class-request.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Here is an example that handles all the cases:

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

Returns the value of the header matching the name. The name is case insensitive.
Returns the value of the header matching the name. The name is case-insensitive.

**Usage**

Expand Down
4 changes: 2 additions & 2 deletions java/docs/api/class-response.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Response.fromServiceWorker();

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

Returns the value of the header matching the name. The name is case insensitive. If multiple headers have the same name (except `set-cookie`), they are returned as a list separated by `, `. For `set-cookie`, the `\n` separator is used. If no headers are found, `null` is returned.
Returns the value of the header matching the name. The name is case-insensitive. If multiple headers have the same name (except `set-cookie`), they are returned as a list separated by `, `. For `set-cookie`, the `\n` separator is used. If no headers are found, `null` is returned.

**Usage**

Expand All @@ -125,7 +125,7 @@ Response.headerValue(name);

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

Returns all values of the headers matching the name, for example `set-cookie`. The name is case insensitive.
Returns all values of the headers matching the name, for example `set-cookie`. The name is case-insensitive.

**Usage**

Expand Down
2 changes: 1 addition & 1 deletion java/docs/auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Redoing login for every test can slow down test execution. To mitigate that, reu

Playwright provides a way to reuse the signed-in state in the tests. That way you can log in only once and then skip the log in step for all of the tests.

Web apps use cookie-based or token-based authentication, where authenticated state is stored as [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies) or in [local storage](https://developer.mozilla.org/en-US/docs/Web/API/Storage). Playwright provides [BrowserContext.storageState()](/api/class-browsercontext.mdx#browser-context-storage-state) method that can be used to retrieve storage state from authenticated contexts and then create new contexts with pre-populated state.
Web apps use cookie-based or token-based authentication, where authenticated state is stored as [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies) or in [local storage](https://developer.mozilla.org/en-US/docs/Web/API/Storage). Playwright provides [BrowserContext.storageState()](/api/class-browsercontext.mdx#browser-context-storage-state) method that can be used to retrieve storage state from authenticated contexts and then create new contexts with prepopulated state.

Cookies and local storage state can be used across different browsers. They depend on your application's authentication model: some apps might require both cookies and local storage.

Expand Down
2 changes: 1 addition & 1 deletion java/docs/browsers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="in

Playwright downloads Chromium, WebKit and Firefox browsers into the OS-specific cache folders:
- `%USERPROFILE%\AppData\Local\ms-playwright` on Windows
- `~/Library/Caches/ms-playwright` on MacOS
- `~/Library/Caches/ms-playwright` on macOS
- `~/.cache/ms-playwright` on Linux

These browsers will take a few hundred megabytes of disk space when installed:
Expand Down
2 changes: 1 addition & 1 deletion java/docs/release-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ This version was also tested against the following stable channels:
- [Locator.highlight()](/api/class-locator.mdx#locator-highlight) visually reveals element(s) for easier debugging.
### Announcements
- v1.20 is the last release to receive WebKit update for macOS 10.15 Catalina. Please update MacOS to keep using latest & greatest WebKit!
- v1.20 is the last release to receive WebKit update for macOS 10.15 Catalina. Please update macOS to keep using latest & greatest WebKit!
### Browser Versions
- Chromium 101.0.4921.0
Expand Down
4 changes: 2 additions & 2 deletions nodejs/docs/accessibility-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ If the element in question is used repeatedly in many pages, consider [using a t

### Disabling individual scan rules

If your application contains many different pre-existing violations of a specific rule, you can use [`AxeBuilder.disableRules()`](https://github.com/dequelabs/axe-core-npm/blob/develop/packages/playwright/README.md#axebuilderdisablerulesrules-stringarray) to temporarily disable individual rules until you're able to fix the issues.
If your application contains many different preexisting violations of a specific rule, you can use [`AxeBuilder.disableRules()`](https://github.com/dequelabs/axe-core-npm/blob/develop/packages/playwright/README.md#axebuilderdisablerulesrules-stringarray) to temporarily disable individual rules until you're able to fix the issues.

You can find the rule IDs to pass to `disableRules()` in the `id` property of the violations you want to suppress. A [complete list of axe's rules](https://github.com/dequelabs/axe-core/blob/master/doc/rule-descriptions.md) can be found in `axe-core`'s documentation.

Expand All @@ -185,7 +185,7 @@ test('should not have any accessibility violations outside of rules with known i

### Using snapshots to allow specific known issues

If you would like to allow for a more granular set of known issues, you can use [Snapshots](./test-snapshots.mdx) to verify that a set of pre-existing violations has not changed. This approach avoids the downsides of using `AxeBuilder.exclude()` at the cost of slightly more complexity and fragility.
If you would like to allow for a more granular set of known issues, you can use [Snapshots](./test-snapshots.mdx) to verify that a set of preexisting violations has not changed. This approach avoids the downsides of using `AxeBuilder.exclude()` at the cost of slightly more complexity and fragility.

Do not use a snapshot of the entire `accessibilityScanResults.violations` array. It contains implementation details of the elements in question, such as a snippet of their rendered HTML; if you include these in your snapshots, it will make your tests prone to breaking every time one of the components in question changes for an unrelated reason:

Expand Down
1 change: 0 additions & 1 deletion nodejs/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@ await browserContext.grantPermissions(permissions, options);
* `'notifications'`
* `'payment-handler'`
* `'storage-access'`
* `'window-management'`
- `options` [Object] *(optional)*
- `origin` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-grant-permissions-option-origin"/><a href="#browser-context-grant-permissions-option-origin" class="list-anchor">#</a>

Expand Down
2 changes: 1 addition & 1 deletion nodejs/docs/api/class-frame.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ await frame.addScriptTag(options);
Path to the JavaScript file to be injected into frame. If `path` is a relative path, then it is resolved relative to the current working directory.
- `type` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-add-script-tag-option-type"/><a href="#frame-add-script-tag-option-type" class="list-anchor">#</a>

Script type. Use 'module' in order to load a Javascript ES6 module. See [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.
Script type. Use 'module' in order to load a JavaScript ES6 module. See [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.
- `url` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-add-script-tag-option-url"/><a href="#frame-add-script-tag-option-url" class="list-anchor">#</a>

URL of a script to be added.
Expand Down
Loading

0 comments on commit 5ec8a35

Please sign in to comment.