From 632e7c4f463b33d25435fd0e7f3e06aee573b040 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 13 Mar 2025 10:11:27 +0000 Subject: [PATCH] feat(roll): roll to ToT Playwright (13-03-25) --- dotnet/docs/api/class-browsertype.mdx | 6 +++--- dotnet/docs/aria-snapshots.mdx | 2 +- java/docs/accessibility-testing.mdx | 2 +- java/docs/api/class-browsertype.mdx | 6 +++--- java/docs/aria-snapshots.mdx | 2 +- java/docs/intro.mdx | 2 +- java/docs/test-runners.mdx | 10 +++++----- java/docs/writing-tests.mdx | 2 +- nodejs/docs/accessibility-testing.mdx | 2 +- nodejs/docs/api/class-accessibility.mdx | 2 +- nodejs/docs/api/class-browsertype.mdx | 8 ++++---- nodejs/docs/api/class-testoptions.mdx | 2 +- nodejs/docs/aria-snapshots.mdx | 2 +- nodejs/docs/best-practices.mdx | 16 ++++++++-------- nodejs/docs/ci-intro.mdx | 4 ++-- nodejs/docs/intro.mdx | 14 +++++++------- nodejs/docs/test-components.mdx | 18 +++++++++--------- python/docs/api-testing.mdx | 2 +- python/docs/api/class-accessibility.mdx | 2 +- python/docs/api/class-browsertype.mdx | 6 +++--- python/docs/aria-snapshots.mdx | 2 +- python/docs/browsers.mdx | 2 +- python/docs/library.mdx | 4 ++-- python/docs/test-runners.mdx | 2 +- 24 files changed, 60 insertions(+), 60 deletions(-) diff --git a/dotnet/docs/api/class-browsertype.mdx b/dotnet/docs/api/class-browsertype.mdx index fe3ff1ac73e..59530a46f51 100644 --- a/dotnet/docs/api/class-browsertype.mdx +++ b/dotnet/docs/api/class-browsertype.mdx @@ -218,7 +218,7 @@ var browser = await playwright.Chromium.LaunchAsync(new() { Close the browser process on SIGTERM. Defaults to `true`. - `Headless` [bool]? *(optional)*# - Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the [Devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. + Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the [Devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. - `IgnoreAllDefaultArgs` [bool]? *(optional)* Added in: v1.9# If `true`, Playwright does not pass its own configurations args and only uses the ones from [Args](/api/class-browsertype.mdx#browser-type-launch-option-args). Dangerous option; use with care. Defaults to `false`. @@ -272,7 +272,7 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options); **Arguments** - `userDataDir` [string]# - Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). Note that Chromium's user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Pass an empty string to use a temporary directory instead. + Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and [Firefox](https://wiki.mozilla.org/Firefox/CommandLineOptions#User_profile). Note that Chromium's user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Pass an empty string to use a temporary directory instead. - `options` `BrowserTypeLaunchPersistentContextOptions?` *(optional)* - `AcceptDownloads` [bool]? *(optional)*# @@ -400,7 +400,7 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options); Specifies if viewport supports touch events. Defaults to false. Learn more about [mobile emulation](../emulation.mdx#devices). - `Headless` [bool]? *(optional)*# - Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the [Devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. + Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the [Devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. - `HttpCredentials` HttpCredentials? *(optional)*# - `Username` [string] diff --git a/dotnet/docs/aria-snapshots.mdx b/dotnet/docs/aria-snapshots.mdx index d4c5e75fd21..487486f4625 100644 --- a/dotnet/docs/aria-snapshots.mdx +++ b/dotnet/docs/aria-snapshots.mdx @@ -84,7 +84,7 @@ Each accessible element in the tree is represented as a YAML node: - **"name"**: Accessible name of the element. Quoted strings indicate exact values, `/patterns/` are used for regular expression. - **[attribute=value]**: Attributes and values, in square brackets, represent specific ARIA attributes, such as `checked`, `disabled`, `expanded`, `level`, `pressed`, or `selected`. -These values are derived from ARIA attributes or calculated based on HTML semantics. To inspect the accessibility tree structure of a page, use the [Chrome DevTools Accessibility Pane](https://developer.chrome.com/docs/devtools/accessibility/reference#pane). +These values are derived from ARIA attributes or calculated based on HTML semantics. To inspect the accessibility tree structure of a page, use the [Chrome DevTools Accessibility Tab](https://developer.chrome.com/docs/devtools/accessibility/reference#tab). ## Snapshot matching diff --git a/java/docs/accessibility-testing.mdx b/java/docs/accessibility-testing.mdx index c0f96620a43..e6f0cd9d490 100644 --- a/java/docs/accessibility-testing.mdx +++ b/java/docs/accessibility-testing.mdx @@ -110,7 +110,7 @@ AxeResults accessibilityScanResults = new AxeBuilder(page) assertEquals(Collections.emptyList(), accessibilityScanResults.getViolations()); ``` -You can find a complete listing of the rule tags axe-core supports in [the "Axe-core Tags" section of the axe API documentation](https://www.deque.com/axe/core-documentation/api-documentation/#axe-core-tags). +You can find a complete listing of the rule tags axe-core supports in [the "Axe-core Tags" section of the axe API documentation](https://www.deque.com/axe/core-documentation/api-documentation/#axecore-tags). ## Handling known issues diff --git a/java/docs/api/class-browsertype.mdx b/java/docs/api/class-browsertype.mdx index cc44038daea..5003b9df3ab 100644 --- a/java/docs/api/class-browsertype.mdx +++ b/java/docs/api/class-browsertype.mdx @@ -217,7 +217,7 @@ Browser browser = chromium.launch(new BrowserType.LaunchOptions() Close the browser process on SIGTERM. Defaults to `true`. - `setHeadless` [boolean] *(optional)*# - Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the [setDevtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. + Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the [setDevtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. - `setIgnoreAllDefaultArgs` [boolean] *(optional)* Added in: v1.9# If `true`, Playwright does not pass its own configurations args and only uses the ones from [setArgs](/api/class-browsertype.mdx#browser-type-launch-option-args). Dangerous option; use with care. Defaults to `false`. @@ -272,7 +272,7 @@ BrowserType.launchPersistentContext(userDataDir, options); **Arguments** - `userDataDir` [Path]# - Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). Note that Chromium's user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Pass an empty string to use a temporary directory instead. + Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and [Firefox](https://wiki.mozilla.org/Firefox/CommandLineOptions#User_profile). Note that Chromium's user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Pass an empty string to use a temporary directory instead. - `options` `BrowserType.LaunchPersistentContextOptions` *(optional)* - `setAcceptDownloads` [boolean] *(optional)*# @@ -400,7 +400,7 @@ BrowserType.launchPersistentContext(userDataDir, options); Specifies if viewport supports touch events. Defaults to false. Learn more about [mobile emulation](../emulation.mdx#devices). - `setHeadless` [boolean] *(optional)*# - Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the [setDevtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. + Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the [setDevtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. - `setHttpCredentials` HttpCredentials *(optional)*# - `setUsername` [String] diff --git a/java/docs/aria-snapshots.mdx b/java/docs/aria-snapshots.mdx index ec1d1f0ab99..0272707b973 100644 --- a/java/docs/aria-snapshots.mdx +++ b/java/docs/aria-snapshots.mdx @@ -84,7 +84,7 @@ Each accessible element in the tree is represented as a YAML node: - **"name"**: Accessible name of the element. Quoted strings indicate exact values, `/patterns/` are used for regular expression. - **[attribute=value]**: Attributes and values, in square brackets, represent specific ARIA attributes, such as `checked`, `disabled`, `expanded`, `level`, `pressed`, or `selected`. -These values are derived from ARIA attributes or calculated based on HTML semantics. To inspect the accessibility tree structure of a page, use the [Chrome DevTools Accessibility Pane](https://developer.chrome.com/docs/devtools/accessibility/reference#pane). +These values are derived from ARIA attributes or calculated based on HTML semantics. To inspect the accessibility tree structure of a page, use the [Chrome DevTools Accessibility Tab](https://developer.chrome.com/docs/devtools/accessibility/reference#tab). ## Snapshot matching diff --git a/java/docs/intro.mdx b/java/docs/intro.mdx index b357d619ba1..65c32f4c4f8 100644 --- a/java/docs/intro.mdx +++ b/java/docs/intro.mdx @@ -30,7 +30,7 @@ public class App { try (Playwright playwright = Playwright.create()) { Browser browser = playwright.chromium().launch(); Page page = browser.newPage(); - page.navigate("http://playwright.dev"); + page.navigate("https://playwright.dev"); System.out.println(page.title()); } } diff --git a/java/docs/test-runners.mdx b/java/docs/test-runners.mdx index 8e7cb20de6a..2dc23ff302e 100644 --- a/java/docs/test-runners.mdx +++ b/java/docs/test-runners.mdx @@ -183,11 +183,11 @@ junit.jupiter.execution.parallel.config.dynamic.factor=0.5 You can use a Gradle build configuration script, written in Groovy or Kotlin. - + - + -```groovy +```groovy title="build.gradle" plugins { application id 'java' @@ -218,9 +218,9 @@ test { - + -```groovy +```groovy title="build.gradle.kts" plugins { application id("java") diff --git a/java/docs/writing-tests.mdx b/java/docs/writing-tests.mdx index e6efb4f54ec..95018cbf098 100644 --- a/java/docs/writing-tests.mdx +++ b/java/docs/writing-tests.mdx @@ -26,7 +26,7 @@ public class App { try (Playwright playwright = Playwright.create()) { Browser browser = playwright.chromium().launch(); Page page = browser.newPage(); - page.navigate("http://playwright.dev"); + page.navigate("https://playwright.dev"); // Expect a title "to contain" a substring. assertThat(page).hasTitle(Pattern.compile("Playwright")); diff --git a/nodejs/docs/accessibility-testing.mdx b/nodejs/docs/accessibility-testing.mdx index c6745d1b0b6..81bd8412038 100644 --- a/nodejs/docs/accessibility-testing.mdx +++ b/nodejs/docs/accessibility-testing.mdx @@ -134,7 +134,7 @@ test('should not have any automatically detectable WCAG A or AA violations', asy }); ``` -You can find a complete listing of the rule tags axe-core supports in [the "Axe-core Tags" section of the axe API documentation](https://www.deque.com/axe/core-documentation/api-documentation/#axe-core-tags). +You can find a complete listing of the rule tags axe-core supports in [the "Axe-core Tags" section of the axe API documentation](https://www.deque.com/axe/core-documentation/api-documentation/#axecore-tags). ## Handling known issues diff --git a/nodejs/docs/api/class-accessibility.mdx b/nodejs/docs/api/class-accessibility.mdx index 9f4f478a56d..262d3905dd5 100644 --- a/nodejs/docs/api/class-accessibility.mdx +++ b/nodejs/docs/api/class-accessibility.mdx @@ -79,7 +79,7 @@ function findFocusedNode(node) { - [Promise]<[null] | [Object]># - `role` [string] - The [role](https://www.w3.org/TR/wai-aria/#usage_intro). + The [role](https://www.w3.org/TR/wai-aria/#usage). - `name` [string] A human readable name for the node. diff --git a/nodejs/docs/api/class-browsertype.mdx b/nodejs/docs/api/class-browsertype.mdx index fbdf67d9568..a8924308c4c 100644 --- a/nodejs/docs/api/class-browsertype.mdx +++ b/nodejs/docs/api/class-browsertype.mdx @@ -221,7 +221,7 @@ const browser = await chromium.launch({ // Or 'firefox' or 'webkit'. Close the browser process on SIGTERM. Defaults to `true`. - `headless` [boolean] *(optional)*# - Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the [devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. + Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the [devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. - `ignoreDefaultArgs` [boolean] | [Array]<[string]> *(optional)*# If `true`, Playwright does not pass its own configurations args and only uses the ones from [args](/api/class-browsertype.mdx#browser-type-launch-option-args). If an array is given, then filters out the given default arguments. Dangerous option; use with care. Defaults to `false`. @@ -276,7 +276,7 @@ await browserType.launchPersistentContext(userDataDir, options); **Arguments** - `userDataDir` [string]# - Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). Note that Chromium's user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Pass an empty string to use a temporary directory instead. + Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and [Firefox](https://wiki.mozilla.org/Firefox/CommandLineOptions#User_profile). Note that Chromium's user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Pass an empty string to use a temporary directory instead. - `options` [Object] *(optional)* - `acceptDownloads` [boolean] *(optional)*# @@ -404,7 +404,7 @@ await browserType.launchPersistentContext(userDataDir, options); Specifies if viewport supports touch events. Defaults to false. Learn more about [mobile emulation](../emulation.mdx#devices). - `headless` [boolean] *(optional)*# - Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the [devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. + Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the [devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. - `httpCredentials` [Object] *(optional)*# - `username` [string] @@ -639,7 +639,7 @@ const { chromium } = require('playwright'); // Or 'webkit' or 'firefox'. Close the browser process on SIGTERM. Defaults to `true`. - `headless` [boolean] *(optional)*# - Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the [devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. + Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the [devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. - `host` [string] *(optional)* Added in: v1.45# Host to use for the web socket. It is optional and if it is omitted, the server will accept connections on the unspecified IPv6 address (::) when IPv6 is available, or the unspecified IPv4 address (0.0.0.0) otherwise. Consider hardening it with picking a specific interface. diff --git a/nodejs/docs/api/class-testoptions.mdx b/nodejs/docs/api/class-testoptions.mdx index 346865064cd..1f81b05e3e5 100644 --- a/nodejs/docs/api/class-testoptions.mdx +++ b/nodejs/docs/api/class-testoptions.mdx @@ -452,7 +452,7 @@ export default defineConfig({ Added in: v1.10testOptions.headless -Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the [devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. +Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the [devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. **Usage** diff --git a/nodejs/docs/aria-snapshots.mdx b/nodejs/docs/aria-snapshots.mdx index 8cfb3caf08b..9e7dc2c4b56 100644 --- a/nodejs/docs/aria-snapshots.mdx +++ b/nodejs/docs/aria-snapshots.mdx @@ -84,7 +84,7 @@ Each accessible element in the tree is represented as a YAML node: - **"name"**: Accessible name of the element. Quoted strings indicate exact values, `/patterns/` are used for regular expression. - **[attribute=value]**: Attributes and values, in square brackets, represent specific ARIA attributes, such as `checked`, `disabled`, `expanded`, `level`, `pressed`, or `selected`. -These values are derived from ARIA attributes or calculated based on HTML semantics. To inspect the accessibility tree structure of a page, use the [Chrome DevTools Accessibility Pane](https://developer.chrome.com/docs/devtools/accessibility/reference#pane). +These values are derived from ARIA attributes or calculated based on HTML semantics. To inspect the accessibility tree structure of a page, use the [Chrome DevTools Accessibility Tab](https://developer.chrome.com/docs/devtools/accessibility/reference#tab). ## Snapshot matching diff --git a/nodejs/docs/best-practices.mdx b/nodejs/docs/best-practices.mdx index 2340ea4ad14..b014115c576 100644 --- a/nodejs/docs/best-practices.mdx +++ b/nodejs/docs/best-practices.mdx @@ -115,7 +115,7 @@ Playwright has a [test generator](./codegen.mdx) that can generate tests and pic To pick a locator run the `codegen` command followed by the URL that you would like to pick a locator from. - + @@ -197,7 +197,7 @@ You can live debug your test by clicking or editing the locators in your test in You can also debug your tests with the Playwright inspector by running your tests with the `--debug` flag. - + @@ -231,7 +231,7 @@ You can then step through your test, view actionability logs and edit the locato To debug a specific test add the name of the test file and the line number of the test followed by the `--debug` flag. - + @@ -267,7 +267,7 @@ For CI failures, use the Playwright [trace viewer](./trace-viewer.mdx) instead o Traces are configured in the Playwright config file and are set to run on CI on the first retry of a failed test. We don't recommend setting this to `on` so that traces are run on every test as it's very performance heavy. However you can run a trace locally when developing with the `--trace` flag. - + @@ -297,7 +297,7 @@ pnpm exec playwright test --trace on Once you run this command your traces will be recorded for each test and can be viewed directly from the HTML report. - + @@ -369,7 +369,7 @@ export default defineConfig({ By keeping your Playwright version up to date you will be able to test your app on the latest browser versions and catch failures before the latest browser version is released to the public. - + @@ -401,7 +401,7 @@ Check the [release notes](./release-notes.mdx) to see what the latest version is You can see what version of Playwright you have by running the following command. - + @@ -468,7 +468,7 @@ test('runs in parallel 2', async ({ page }) => { /* ... */ }); Playwright can [shard](./test-parallel.mdx#shard-tests-between-multiple-machines) a test suite, so that it can be executed on multiple machines. - + diff --git a/nodejs/docs/ci-intro.mdx b/nodejs/docs/ci-intro.mdx index d4c2ccd5288..da1e0c7eb43 100644 --- a/nodejs/docs/ci-intro.mdx +++ b/nodejs/docs/ci-intro.mdx @@ -121,7 +121,7 @@ Downloading the HTML report as a zip file is not very convenient. However, we ca - `AZCOPY_SPA_CLIENT_SECRET` - `AZCOPY_TENANT_ID` - For a detailed guide on how to authorize a service principal using a client secret, refer to [this Microsoft documentation](https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-authorize-azure-active-directory#authorize-a-service-principal-by-using-a-client-secret-1). + For a detailed guide on how to authorize a service principal using a client secret, refer to [this Microsoft documentation](https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-authorize-azure-active-directory#authorize-a-service-principal-by-using-a-client-secret). 1. Add a step that uploads the HTML report to Azure Storage. ```yaml title=".github/workflows/playwright.yml" @@ -143,7 +143,7 @@ The contents of the `$web` storage container can be accessed from a browser by u :::note -This step will not work for pull requests created from a forked repository because such workflow [doesn't have access to the secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow). +This step will not work for pull requests created from a forked repository because such workflow [doesn't have access to the secrets](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#using-secrets-in-a-workflow). ::: ## What's Next diff --git a/nodejs/docs/intro.mdx b/nodejs/docs/intro.mdx index f40def8c434..c0de939fb47 100644 --- a/nodejs/docs/intro.mdx +++ b/nodejs/docs/intro.mdx @@ -20,7 +20,7 @@ Playwright Test was created specifically to accommodate the needs of end-to-end Get started by installing Playwright using npm, yarn or pnpm. Alternatively you can also get started and run your tests using the [VS Code Extension](./getting-started-vscode.mdx). - + @@ -76,7 +76,7 @@ The `tests` folder contains a basic example test to help you get started with te By default tests will be run on all 3 browsers, Chromium, Firefox and WebKit using 3 workers. This can be configured in the [playwright.config file](./test-configuration.mdx). Tests are run in headless mode meaning no browser will open up when running the tests. Results of the tests and test logs will be shown in the terminal. - + @@ -104,13 +104,13 @@ pnpm exec playwright test -![tests running in command line](https://github.com/microsoft/playwright/assets/13063165/981c1b2b-dc7e-4b85-b241-272b44da6628) See our doc on [Running Tests](./running-tests.mdx) to learn more about running tests in headed mode, running multiple tests, running specific tests etc. +![tests running in command line](https://github.com/microsoft/playwright/assets/13063165/981c1b2b-dc7e-4b85-b241-272b44da6628) See our doc on [Running Tests](./running-tests.mdx) to learn more about running tests in headed mode, running multiple tests, running specific tests etc. ## HTML Test Reports After your test completes, an [HTML Reporter](./test-reporters.mdx#html-reporter) will be generated, which shows you a full report of your tests allowing you to filter the report by browsers, passed tests, failed tests, skipped tests and flaky tests. You can click on each test and explore the test's errors as well as each step of the test. By default, the HTML report is opened automatically if some of the tests failed. - + @@ -144,7 +144,7 @@ pnpm exec playwright show-report Run your tests with [UI Mode](./test-ui-mode.mdx) for a better developer experience with time travel debugging, watch mode and more. - + @@ -180,7 +180,7 @@ Check out or [detailed guide on UI Mode](./test-ui-mode.mdx) to learn more about To update Playwright to the latest version run the following command: - + @@ -216,7 +216,7 @@ pnpm exec playwright install --with-deps You can always check which version of Playwright you have by running the following command: - + diff --git a/nodejs/docs/test-components.mdx b/nodejs/docs/test-components.mdx index 7e5823d177f..beb4ad2a57a 100644 --- a/nodejs/docs/test-components.mdx +++ b/nodejs/docs/test-components.mdx @@ -44,7 +44,7 @@ Adding Playwright Test to an existing project is easy. Below are the steps to en ### Step 1: Install Playwright Test for components for your respective framework - + @@ -93,7 +93,7 @@ You can include stylesheets, apply theme and inject code into the page where com ### Step 2. Create a test file `src/App.spec.{ts,tsx}` - + @@ -273,7 +273,7 @@ Playwright is using [Vite](https://vitejs.dev/) to create the components bundle Provide props to a component when mounted. - + @@ -326,7 +326,7 @@ test('props', async ({ mount }) => { Provide callbacks/events to a component when mounted. - + @@ -379,7 +379,7 @@ test('event', async ({ mount }) => { Provide children/slots to a component when mounted. - + @@ -432,7 +432,7 @@ test('children', async ({ mount }) => { You can use `beforeMount` and `afterMount` hooks to configure your app. This lets you set up things like your app router, fake server etc. giving you the flexibility you need. You can also pass custom configuration from the `mount` call from a test, which is accessible from the `hooksConfig` fixture. This includes any config that needs to be run before or after mounting the component. An example of configuring a router is provided below: - + @@ -502,7 +502,7 @@ test('configure routing through hooks config', async ({ page, mount }) => { Unmount the mounted component from the DOM. This is useful for testing the component's behavior upon unmounting. Use cases include testing an "Are you sure you want to leave?" modal or ensuring proper cleanup of event handlers to prevent memory leaks. - + @@ -559,7 +559,7 @@ test('unmount', async ({ mount }) => { Update props, slots/children, and/or events/callbacks of a mounted component. These component inputs can change at any time and are typically provided by the parent component, but sometimes it is necessary to ensure that your components behave appropriately to new inputs. - + @@ -673,7 +673,7 @@ test('…', async ({ mount, page, context }) => { `@playwright/experimental-ct-{react,svelte,vue}` wrap `@playwright/test` to provide an additional built-in component-testing specific fixture called `mount`: - + diff --git a/python/docs/api-testing.mdx b/python/docs/api-testing.mdx index 8c1e91a7242..7e85be1d45b 100644 --- a/python/docs/api-testing.mdx +++ b/python/docs/api-testing.mdx @@ -116,7 +116,7 @@ def test_should_create_feature_request(api_request_context: APIRequestContext) - ### Setup and teardown -These tests assume that repository exists. You probably want to create a new one before running tests and delete it afterwards. Use a [session fixture](https://docs.pytest.org/en/stable/fixture.html#fixture-scopes) for that. The part before `yield` is the before all and after is the after all. +These tests assume that repository exists. You probably want to create a new one before running tests and delete it afterwards. Use a [session fixture](https://docs.pytest.org/en/stable/how-to/fixtures.html#fixture-scopes) for that. The part before `yield` is the before all and after is the after all. ```python # ... diff --git a/python/docs/api/class-accessibility.mdx b/python/docs/api/class-accessibility.mdx index 4b57e2d20cd..2715c1a8178 100644 --- a/python/docs/api/class-accessibility.mdx +++ b/python/docs/api/class-accessibility.mdx @@ -130,7 +130,7 @@ if node: - [NoneType] | [Dict]# - `role` [str] - The [role](https://www.w3.org/TR/wai-aria/#usage_intro). + The [role](https://www.w3.org/TR/wai-aria/#usage). - `name` [str] A human readable name for the node. diff --git a/python/docs/api/class-browsertype.mdx b/python/docs/api/class-browsertype.mdx index c58687d0aa0..616c6062805 100644 --- a/python/docs/api/class-browsertype.mdx +++ b/python/docs/api/class-browsertype.mdx @@ -273,7 +273,7 @@ browser = await playwright.chromium.launch( # or "firefox" or "webkit". Close the browser process on SIGTERM. Defaults to `true`. - `headless` [bool] *(optional)*# - Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the [devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. + Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the [devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. - `ignore_default_args` [bool] | [List]\[[str]\] *(optional)*# If `true`, Playwright does not pass its own configurations args and only uses the ones from [args](/api/class-browsertype.mdx#browser-type-launch-option-args). If an array is given, then filters out the given default arguments. Dangerous option; use with care. Defaults to `false`. @@ -325,7 +325,7 @@ browser_type.launch_persistent_context(user_data_dir, **kwargs) **Arguments** - `user_data_dir` [Union]\[[str], [pathlib.Path]\]# - Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). Note that Chromium's user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Pass an empty string to use a temporary directory instead. + Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and [Firefox](https://wiki.mozilla.org/Firefox/CommandLineOptions#User_profile). Note that Chromium's user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Pass an empty string to use a temporary directory instead. - `accept_downloads` [bool] *(optional)*# Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted. @@ -452,7 +452,7 @@ browser_type.launch_persistent_context(user_data_dir, **kwargs) Specifies if viewport supports touch events. Defaults to false. Learn more about [mobile emulation](../emulation.mdx#devices). - `headless` [bool] *(optional)*# - Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the [devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. + Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the [devtools](/api/class-browsertype.mdx#browser-type-launch-option-devtools) option is `true`. - `http_credentials` [Dict] *(optional)*# - `username` [str] diff --git a/python/docs/aria-snapshots.mdx b/python/docs/aria-snapshots.mdx index 988626da702..423608b9a05 100644 --- a/python/docs/aria-snapshots.mdx +++ b/python/docs/aria-snapshots.mdx @@ -111,7 +111,7 @@ Each accessible element in the tree is represented as a YAML node: - **"name"**: Accessible name of the element. Quoted strings indicate exact values, `/patterns/` are used for regular expression. - **[attribute=value]**: Attributes and values, in square brackets, represent specific ARIA attributes, such as `checked`, `disabled`, `expanded`, `level`, `pressed`, or `selected`. -These values are derived from ARIA attributes or calculated based on HTML semantics. To inspect the accessibility tree structure of a page, use the [Chrome DevTools Accessibility Pane](https://developer.chrome.com/docs/devtools/accessibility/reference#pane). +These values are derived from ARIA attributes or calculated based on HTML semantics. To inspect the accessibility tree structure of a page, use the [Chrome DevTools Accessibility Tab](https://developer.chrome.com/docs/devtools/accessibility/reference#tab). ## Snapshot matching diff --git a/python/docs/browsers.mdx b/python/docs/browsers.mdx index a5d501be534..477b848fbc5 100644 --- a/python/docs/browsers.mdx +++ b/python/docs/browsers.mdx @@ -147,7 +147,7 @@ with sync_playwright() as p: # Channel can be "chrome", "msedge", "chrome-beta", "msedge-beta" or "msedge-dev". browser = p.chromium.launch(channel="msedge") page = browser.new_page() - page.goto("http://playwright.dev") + page.goto("https://playwright.dev") print(page.title()) browser.close() ``` diff --git a/python/docs/library.mdx b/python/docs/library.mdx index b809308695d..6cd17df8fd7 100644 --- a/python/docs/library.mdx +++ b/python/docs/library.mdx @@ -41,7 +41,7 @@ from playwright.sync_api import sync_playwright with sync_playwright() as p: browser = p.chromium.launch() page = browser.new_page() - page.goto("http://playwright.dev") + page.goto("https://playwright.dev") print(page.title()) browser.close() ``` @@ -56,7 +56,7 @@ async def main(): async with async_playwright() as p: browser = await p.chromium.launch() page = await browser.new_page() - await page.goto("http://playwright.dev") + await page.goto("https://playwright.dev") print(await page.title()) await browser.close() diff --git a/python/docs/test-runners.mdx b/python/docs/test-runners.mdx index dfbe5818436..ef32956773b 100644 --- a/python/docs/test-runners.mdx +++ b/python/docs/test-runners.mdx @@ -257,7 +257,7 @@ See the [guides for CI providers](./ci.mdx) to deploy your tests to CI/CD. ## Async Fixtures -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=session`](https://pytest-asyncio.readthedocs.io/en/latest/how-to-guides/run_session_tests_in_same_loop.html). +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=session`](https://pytest-asyncio.readthedocs.io/en/stable/how-to-guides/run_session_tests_in_same_loop.html). ```python import pytest