From 7a939109061552139fc0027ff23eed1c95d15608 Mon Sep 17 00:00:00 2001 From: cpadm <57954026+cpAdm@users.noreply.github.com> Date: Thu, 13 Mar 2025 09:53:29 +0100 Subject: [PATCH 1/2] docs: Update outdated links & broken anchors --- docs/src/accessibility-testing-java.md | 2 +- docs/src/accessibility-testing-js.md | 2 +- docs/src/api-testing-python.md | 2 +- docs/src/api/class-accessibility.md | 2 +- docs/src/api/class-browsertype.md | 2 +- docs/src/api/params.md | 2 +- docs/src/aria-snapshots.md | 2 +- docs/src/browsers.md | 2 +- docs/src/ci-intro.md | 4 ++-- docs/src/intro-java.md | 2 +- docs/src/library-python.md | 4 ++-- docs/src/test-runners-python.md | 2 +- docs/src/writing-tests-java.md | 2 +- packages/playwright-client/types/types.d.ts | 12 ++++++------ packages/playwright-core/types/types.d.ts | 12 ++++++------ packages/playwright/types/test.d.ts | 2 +- 16 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/src/accessibility-testing-java.md b/docs/src/accessibility-testing-java.md index 13f9c4e3e496c..f0363672a271e 100644 --- a/docs/src/accessibility-testing-java.md +++ b/docs/src/accessibility-testing-java.md @@ -107,7 +107,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/docs/src/accessibility-testing-js.md b/docs/src/accessibility-testing-js.md index 65db5ae55cef8..ea38e19e9f2d2 100644 --- a/docs/src/accessibility-testing-js.md +++ b/docs/src/accessibility-testing-js.md @@ -113,7 +113,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/docs/src/api-testing-python.md b/docs/src/api-testing-python.md index 68f2626111182..4f0a905a8ecd6 100644 --- a/docs/src/api-testing-python.md +++ b/docs/src/api-testing-python.md @@ -114,7 +114,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/example/special.html) for that. The part before `yield` is the before all and after is the after all. ```python # ... diff --git a/docs/src/api/class-accessibility.md b/docs/src/api/class-accessibility.md index 6164bb05dc153..e5efc9b21f611 100644 --- a/docs/src/api/class-accessibility.md +++ b/docs/src/api/class-accessibility.md @@ -22,7 +22,7 @@ assistive technologies themselves. By default, Playwright tries to approximate t * deprecated: This method is deprecated. Please use other libraries such as [Axe](https://www.deque.com/axe/) if you need to test page accessibility. See our Node.js [guide](https://playwright.dev/docs/accessibility-testing) for integration with Axe. - returns: <[null]|[Object]> - - `role` <[string]> The [role](https://www.w3.org/TR/wai-aria/#usage_intro). + - `role` <[string]> The [role](https://www.w3.org/TR/wai-aria/#usage). - `name` <[string]> A human readable name for the node. - `value` <[string]|[float]> The current value of the node, if applicable. - `description` <[string]> An additional human readable description of the node, if applicable. diff --git a/docs/src/api/class-browsertype.md b/docs/src/api/class-browsertype.md index 29c323f0025f8..8ab2e63f8b7e9 100644 --- a/docs/src/api/class-browsertype.md +++ b/docs/src/api/class-browsertype.md @@ -326,7 +326,7 @@ this context will automatically close the browser. 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). +[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. diff --git a/docs/src/api/params.md b/docs/src/api/params.md index fd548c9c41a04..4c49370044b2e 100644 --- a/docs/src/api/params.md +++ b/docs/src/api/params.md @@ -1061,7 +1061,7 @@ Close the browser process on SIGHUP. Defaults to `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://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the +[Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the [`option: BrowserType.launch.devtools`] option is `true`. ## js-python-browser-option-firefoxuserprefs diff --git a/docs/src/aria-snapshots.md b/docs/src/aria-snapshots.md index 2bbfd8a654e11..394da5bf76098 100644 --- a/docs/src/aria-snapshots.md +++ b/docs/src/aria-snapshots.md @@ -149,7 +149,7 @@ Each accessible element in the tree is represented as a YAML node: 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). +structure of a page, use the [Chrome DevTools Accessibility Tab](https://developer.chrome.com/docs/devtools/accessibility/reference#tab). ## Snapshot matching diff --git a/docs/src/browsers.md b/docs/src/browsers.md index 4b13b35c4ca86..f0131b7d24582 100644 --- a/docs/src/browsers.md +++ b/docs/src/browsers.md @@ -520,7 +520,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/docs/src/ci-intro.md b/docs/src/ci-intro.md index ed7e2208fc596..13313ba89cafd 100644 --- a/docs/src/ci-intro.md +++ b/docs/src/ci-intro.md @@ -291,7 +291,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" @@ -312,7 +312,7 @@ Downloading the HTML report as a zip file is not very convenient. However, we ca The contents of the `$web` storage container can be accessed from a browser by using the [public URL](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website-how-to?tabs=azure-portal#portal-find-url) of the website. :::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). ::: diff --git a/docs/src/intro-java.md b/docs/src/intro-java.md index 9a245c6a6d76e..13dff6f868b25 100644 --- a/docs/src/intro-java.md +++ b/docs/src/intro-java.md @@ -32,7 +32,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/docs/src/library-python.md b/docs/src/library-python.md index f9063ea13a2e8..605cb9798f76a 100644 --- a/docs/src/library-python.md +++ b/docs/src/library-python.md @@ -38,7 +38,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() ``` @@ -53,7 +53,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/docs/src/test-runners-python.md b/docs/src/test-runners-python.md index 22c9e420dd302..a95973501369d 100644 --- a/docs/src/test-runners-python.md +++ b/docs/src/test-runners-python.md @@ -263,7 +263,7 @@ See the [guides for CI providers](./ci.md) 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). +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 diff --git a/docs/src/writing-tests-java.md b/docs/src/writing-tests-java.md index 7a05aca292156..ed12d93915569 100644 --- a/docs/src/writing-tests-java.md +++ b/docs/src/writing-tests-java.md @@ -23,7 +23,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/packages/playwright-client/types/types.d.ts b/packages/playwright-client/types/types.d.ts index 2eb9af4926a89..1573308b562d5 100644 --- a/packages/playwright-client/types/types.d.ts +++ b/packages/playwright-client/types/types.d.ts @@ -14712,9 +14712,9 @@ export interface BrowserType { * and returns the only context. Closing this context will automatically close the browser. * @param userDataDir 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. + * [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. * @param options */ launchPersistentContext(userDataDir: string, options?: { @@ -14933,7 +14933,7 @@ export interface BrowserType { /** * 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 + * [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is * `true`. */ @@ -15327,7 +15327,7 @@ export interface BrowserType { /** * 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 + * [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is * `true`. */ @@ -21702,7 +21702,7 @@ export interface LaunchOptions { /** * 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 + * [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is * `true`. */ diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts index 2eb9af4926a89..1573308b562d5 100644 --- a/packages/playwright-core/types/types.d.ts +++ b/packages/playwright-core/types/types.d.ts @@ -14712,9 +14712,9 @@ export interface BrowserType { * and returns the only context. Closing this context will automatically close the browser. * @param userDataDir 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. + * [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. * @param options */ launchPersistentContext(userDataDir: string, options?: { @@ -14933,7 +14933,7 @@ export interface BrowserType { /** * 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 + * [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is * `true`. */ @@ -15327,7 +15327,7 @@ export interface BrowserType { /** * 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 + * [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is * `true`. */ @@ -21702,7 +21702,7 @@ export interface LaunchOptions { /** * 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 + * [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is * `true`. */ diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.ts index 54725c0bc7689..b3e0cb8595a87 100644 --- a/packages/playwright/types/test.d.ts +++ b/packages/playwright/types/test.d.ts @@ -6144,7 +6144,7 @@ export interface PlaywrightWorkerOptions { /** * 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 + * [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is * `true`. * From 47616f2bca5fb9e8af4f11fd9fd1f59582bf333f Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Thu, 13 Mar 2025 10:39:23 +0100 Subject: [PATCH 2/2] Update docs/src/api-testing-python.md Signed-off-by: Max Schmitt --- docs/src/api-testing-python.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/api-testing-python.md b/docs/src/api-testing-python.md index 4f0a905a8ecd6..ebfb5760a008a 100644 --- a/docs/src/api-testing-python.md +++ b/docs/src/api-testing-python.md @@ -114,7 +114,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/example/special.html) 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 # ...