From a1d690e85b9a987be50d47c8fd320159d49dafd2 Mon Sep 17 00:00:00 2001 From: "microsoft-playwright-automation[bot]" <203992400+microsoft-playwright-automation[bot]@users.noreply.github.com> Date: Fri, 30 Oct 2026 20:12:43 +0000 Subject: [PATCH] feat(roll): roll to ToT Playwright (30-10-26) --- dotnet/docs/api/class-browsercontext.mdx | 10 +- dotnet/docs/api/class-cdpsession.mdx | 6 +- dotnet/docs/api/class-clock.mdx | 4 +- dotnet/docs/ci.mdx | 10 +- dotnet/docs/docker.mdx | 20 ++-- dotnet/docs/emulation.mdx | 20 ++++ dotnet/docs/getting-started-mcp.mdx | 2 +- dotnet/docs/navigations.mdx | 4 + dotnet/docs/release-notes.mdx | 101 ++++++++++++++++ java/docs/accessibility-testing.mdx | 2 + java/docs/actionability.mdx | 2 + java/docs/api-testing.mdx | 2 + java/docs/api/class-apirequest.mdx | 2 + java/docs/api/class-apirequestcontext.mdx | 2 + java/docs/api/class-apiresponse.mdx | 2 + java/docs/api/class-apiresponseassertions.mdx | 2 + java/docs/api/class-browser.mdx | 2 + java/docs/api/class-browsercontext.mdx | 10 +- java/docs/api/class-browsertype.mdx | 2 + java/docs/api/class-cdpsession.mdx | 8 +- java/docs/api/class-clock.mdx | 6 +- java/docs/api/class-consolemessage.mdx | 2 + java/docs/api/class-credentials.mdx | 2 + java/docs/api/class-debugger.mdx | 2 + java/docs/api/class-dialog.mdx | 2 + java/docs/api/class-download.mdx | 2 + java/docs/api/class-elementhandle.mdx | 2 + java/docs/api/class-filechooser.mdx | 2 + java/docs/api/class-formdata.mdx | 2 + java/docs/api/class-frame.mdx | 2 + java/docs/api/class-framelocator.mdx | 2 + java/docs/api/class-jshandle.mdx | 2 + java/docs/api/class-keyboard.mdx | 2 + java/docs/api/class-locator.mdx | 2 + java/docs/api/class-locatorassertions.mdx | 2 + java/docs/api/class-mouse.mdx | 2 + java/docs/api/class-page.mdx | 2 + java/docs/api/class-pageassertions.mdx | 2 + java/docs/api/class-playwright.mdx | 2 + java/docs/api/class-playwrightassertions.mdx | 2 + java/docs/api/class-playwrightexception.mdx | 2 + java/docs/api/class-request.mdx | 2 + java/docs/api/class-requestoptions.mdx | 2 + java/docs/api/class-response.mdx | 2 + java/docs/api/class-route.mdx | 2 + java/docs/api/class-screencast.mdx | 2 + java/docs/api/class-selectors.mdx | 2 + java/docs/api/class-timeouterror.mdx | 2 + java/docs/api/class-touchscreen.mdx | 2 + java/docs/api/class-tracing.mdx | 2 + java/docs/api/class-video.mdx | 2 + java/docs/api/class-weberror.mdx | 2 + java/docs/api/class-webmcp.mdx | 2 + java/docs/api/class-websocket.mdx | 2 + java/docs/api/class-websocketframe.mdx | 2 + java/docs/api/class-websocketroute.mdx | 4 +- java/docs/api/class-webstorage.mdx | 2 + java/docs/api/class-worker.mdx | 2 + java/docs/aria-snapshots.mdx | 2 + java/docs/auth.mdx | 2 + java/docs/browser-contexts.mdx | 2 + java/docs/browsers.mdx | 2 + java/docs/ci-intro.mdx | 2 + java/docs/ci.mdx | 14 ++- java/docs/clock.mdx | 2 + java/docs/codegen-intro.mdx | 2 + java/docs/codegen.mdx | 2 + java/docs/debug.mdx | 2 + java/docs/dialogs.mdx | 2 + java/docs/docker.mdx | 22 ++-- java/docs/downloads.mdx | 2 + java/docs/emulation.mdx | 18 +++ java/docs/evaluating.mdx | 2 + java/docs/events.mdx | 2 + java/docs/extensibility.mdx | 2 + java/docs/frames.mdx | 2 + java/docs/getting-started-cli.mdx | 2 + java/docs/getting-started-mcp.mdx | 4 +- java/docs/handles.mdx | 2 + java/docs/input.mdx | 2 + java/docs/intro.mdx | 4 +- java/docs/junit.mdx | 2 + java/docs/languages.mdx | 2 + java/docs/locators.mdx | 2 + java/docs/mock.mdx | 2 + java/docs/navigations.mdx | 6 + java/docs/network.mdx | 2 + java/docs/other-locators.mdx | 2 + java/docs/pages.mdx | 2 + java/docs/pom.mdx | 2 + java/docs/release-notes.mdx | 96 +++++++++++++++ java/docs/running-tests.mdx | 2 + java/docs/screenshots.mdx | 2 + java/docs/selenium-grid.mdx | 2 + java/docs/test-assertions.mdx | 2 + java/docs/test-runners.mdx | 6 +- java/docs/threading.mdx | 2 + java/docs/touch-events.mdx | 2 + java/docs/trace-viewer-intro.mdx | 2 + java/docs/trace-viewer.mdx | 2 + java/docs/videos.mdx | 2 + java/docs/webview2.mdx | 2 + java/docs/writing-tests.mdx | 2 + nodejs/docs/api/class-browsercontext.mdx | 8 +- nodejs/docs/api/class-cdpsession.mdx | 9 +- nodejs/docs/api/class-clock.mdx | 4 +- nodejs/docs/api/class-frame.mdx | 2 +- nodejs/docs/api/class-page.mdx | 9 +- nodejs/docs/api/class-test.mdx | 2 + nodejs/docs/api/class-testconfig.mdx | 2 +- nodejs/docs/api/class-testoptions.mdx | 9 ++ nodejs/docs/api/class-testrun.mdx | 28 ++++- nodejs/docs/api/class-websocketroute.mdx | 4 +- nodejs/docs/ci-intro.mdx | 2 +- nodejs/docs/ci.mdx | 20 ++-- nodejs/docs/docker.mdx | 22 ++-- nodejs/docs/emulation.mdx | 56 +++++++++ nodejs/docs/getting-started-mcp.mdx | 2 +- nodejs/docs/navigations.mdx | 4 + nodejs/docs/test-assertions.mdx | 40 +++++++ nodejs/docs/test-cli.mdx | 8 ++ nodejs/docs/test-parallel.mdx | 9 +- nodejs/docs/test-reporters.mdx | 19 +++ nodejs/docs/test-sharding.mdx | 4 +- nodejs/docs/test-ui-mode.mdx | 4 +- python/docs/actionability.mdx | 1 + python/docs/api-testing.mdx | 1 + python/docs/api/class-apirequest.mdx | 1 + python/docs/api/class-apirequestcontext.mdx | 1 + python/docs/api/class-apiresponse.mdx | 1 + .../docs/api/class-apiresponseassertions.mdx | 1 + python/docs/api/class-browser.mdx | 7 +- python/docs/api/class-browsercontext.mdx | 23 ++-- python/docs/api/class-browsertype.mdx | 1 + python/docs/api/class-cdpsession.mdx | 4 + python/docs/api/class-clock.mdx | 5 +- python/docs/api/class-consolemessage.mdx | 1 + python/docs/api/class-credentials.mdx | 1 + python/docs/api/class-debugger.mdx | 1 + python/docs/api/class-dialog.mdx | 1 + python/docs/api/class-disposable.mdx | 109 ++++++++++++++++++ python/docs/api/class-download.mdx | 1 + python/docs/api/class-elementhandle.mdx | 19 +-- python/docs/api/class-error.mdx | 1 + python/docs/api/class-filechooser.mdx | 1 + python/docs/api/class-formdata.mdx | 1 + python/docs/api/class-frame.mdx | 31 ++--- python/docs/api/class-framelocator.mdx | 1 + python/docs/api/class-jshandle.mdx | 1 + python/docs/api/class-keyboard.mdx | 1 + python/docs/api/class-locator.mdx | 19 +-- python/docs/api/class-locatorassertions.mdx | 10 +- python/docs/api/class-mouse.mdx | 1 + python/docs/api/class-page.mdx | 29 ++--- python/docs/api/class-pageassertions.mdx | 1 + python/docs/api/class-playwright.mdx | 1 + python/docs/api/class-request.mdx | 1 + python/docs/api/class-response.mdx | 3 +- python/docs/api/class-route.mdx | 1 + python/docs/api/class-screencast.mdx | 1 + python/docs/api/class-selectors.mdx | 1 + python/docs/api/class-timeouterror.mdx | 1 + python/docs/api/class-touchscreen.mdx | 1 + python/docs/api/class-tracing.mdx | 1 + python/docs/api/class-video.mdx | 1 + python/docs/api/class-weberror.mdx | 1 + python/docs/api/class-webmcp.mdx | 1 + python/docs/api/class-websocket.mdx | 1 + python/docs/api/class-websocketroute.mdx | 5 +- python/docs/api/class-webstorage.mdx | 1 + python/docs/api/class-worker.mdx | 1 + python/docs/aria-snapshots.mdx | 1 + python/docs/auth.mdx | 1 + python/docs/browser-contexts.mdx | 1 + python/docs/browsers.mdx | 1 + python/docs/chrome-extensions.mdx | 1 + python/docs/ci-intro.mdx | 3 +- python/docs/ci.mdx | 14 ++- python/docs/clock.mdx | 1 + python/docs/codegen-intro.mdx | 1 + python/docs/codegen.mdx | 1 + python/docs/debug.mdx | 1 + python/docs/dialogs.mdx | 1 + python/docs/docker.mdx | 23 ++-- python/docs/downloads.mdx | 1 + python/docs/emulation.mdx | 43 +++++++ python/docs/evaluating.mdx | 1 + python/docs/events.mdx | 1 + python/docs/extensibility.mdx | 1 + python/docs/frames.mdx | 1 + python/docs/getting-started-cli.mdx | 1 + python/docs/getting-started-mcp.mdx | 3 +- python/docs/handles.mdx | 1 + python/docs/input.mdx | 1 + python/docs/intro.mdx | 1 + python/docs/languages.mdx | 1 + python/docs/library.mdx | 1 + python/docs/locators.mdx | 1 + python/docs/mock.mdx | 1 + python/docs/navigations.mdx | 5 + python/docs/network.mdx | 1 + python/docs/other-locators.mdx | 1 + python/docs/pages.mdx | 1 + python/docs/pom.mdx | 1 + python/docs/release-notes.mdx | 1 + python/docs/running-tests.mdx | 1 + python/docs/screenshots.mdx | 1 + python/docs/selenium-grid.mdx | 1 + python/docs/service-workers.mdx | 1 + python/docs/test-assertions.mdx | 1 + python/docs/test-runners.mdx | 1 + python/docs/touch-events.mdx | 1 + python/docs/trace-viewer-intro.mdx | 1 + python/docs/trace-viewer.mdx | 1 + python/docs/videos.mdx | 1 + python/docs/webview2.mdx | 1 + python/docs/writing-tests.mdx | 1 + src/api_parser.js | 52 +++++++-- src/components/GitHubStarButton/index.tsx | 2 +- src/documentation.js | 33 +++--- 220 files changed, 1110 insertions(+), 212 deletions(-) create mode 100644 python/docs/api/class-disposable.mdx diff --git a/dotnet/docs/api/class-browsercontext.mdx b/dotnet/docs/api/class-browsercontext.mdx index a2df436980..5a59d11c13 100644 --- a/dotnet/docs/api/class-browsercontext.mdx +++ b/dotnet/docs/api/class-browsercontext.mdx @@ -628,13 +628,13 @@ Note that only `WebSocket`s created after this method was called will be routed. Below is an example of a simple handler that blocks some websocket messages. See [WebSocketRoute] for more details and examples. ```csharp -await context.RouteWebSocketAsync("/ws", async ws => { - ws.RouteSend(message => { - if (message == "to-be-blocked") +await context.RouteWebSocketAsync("/ws", ws => { + var server = ws.ConnectToServer(); + ws.OnMessage(frame => { + if (frame.Text == "to-be-blocked") return; - ws.Send(message); + server.Send(frame.Text); }); - await ws.ConnectAsync(); }); ``` diff --git a/dotnet/docs/api/class-cdpsession.mdx b/dotnet/docs/api/class-cdpsession.mdx index 8af3d8e59d..30bdcaadb8 100644 --- a/dotnet/docs/api/class-cdpsession.mdx +++ b/dotnet/docs/api/class-cdpsession.mdx @@ -76,7 +76,7 @@ CdpSession.Event(eventName); **Usage** ```csharp -await CdpSession.SendAsync(method, params); +await CdpSession.SendAsync(method, params, options); ``` **Arguments** @@ -86,6 +86,10 @@ await CdpSession.SendAsync(method, params); - `args` [Map]?<[string], Args> *(optional)* Added in: v1.30# Optional method parameters. +- `options` `CdpSessionSendOptions?` *(optional)* + - `Timeout` [float]? *(optional)* Added in: v1.65# + + Maximum time in milliseconds to wait for the response. Defaults to `0` - no timeout. **Returns** - [JsonElement?]# diff --git a/dotnet/docs/api/class-clock.mdx b/dotnet/docs/api/class-clock.mdx index 4ac10d4996..eb23abf7ef 100644 --- a/dotnet/docs/api/class-clock.mdx +++ b/dotnet/docs/api/class-clock.mdx @@ -32,7 +32,7 @@ await page.Clock.FastForwardAsync("30:00"); **Arguments** - `ticks` [long] | [string]# - Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. + Time may be a finite number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. **Returns** - [void]# @@ -135,7 +135,7 @@ await page.Clock.RunForAsync("30:00"); **Arguments** - `ticks` [long] | [string]# - Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. + Time may be a finite number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. **Returns** - [void]# diff --git a/dotnet/docs/ci.mdx b/dotnet/docs/ci.mdx index 8ddb7c004c..db35a54b0f 100644 --- a/dotnet/docs/ci.mdx +++ b/dotnet/docs/ci.mdx @@ -75,7 +75,7 @@ jobs: name: 'Playwright Tests' runs-on: ubuntu-latest container: - image: mcr.microsoft.com/playwright/dotnet:v1.63.0-noble + image: mcr.microsoft.com/playwright/dotnet:v1.64.1-noble options: --user 1001 steps: - uses: actions/checkout@v6 @@ -157,7 +157,7 @@ trigger: pool: vmImage: ubuntu-latest -container: mcr.microsoft.com/playwright/dotnet:v1.63.0-noble +container: mcr.microsoft.com/playwright/dotnet:v1.64.1-noble steps: - task: UseDotNet@2 @@ -180,7 +180,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In executors: pw-noble-development: docker: - - image: mcr.microsoft.com/playwright/dotnet:v1.63.0-noble + - image: mcr.microsoft.com/playwright/dotnet:v1.64.1-noble ``` Note: When using the docker agent definition, you are specifying the resource class of where playwright runs to the 'medium' tier [here](https://circleci.com/docs/configuration-reference?#docker-execution-environment). The default behavior of Playwright is to set the number of workers to the detected core count (2 in the case of the medium tier). Overriding the number of workers to greater than this number will cause unnecessary timeouts and failures. @@ -191,7 +191,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image]( ```groovy pipeline { - agent { docker { image 'mcr.microsoft.com/playwright/dotnet:v1.63.0-noble' } } + agent { docker { image 'mcr.microsoft.com/playwright/dotnet:v1.64.1-noble' } } stages { stage('e2e-tests') { steps { @@ -208,7 +208,7 @@ pipeline { Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](./docker.mdx)). ```yml -image: mcr.microsoft.com/playwright/dotnet:v1.63.0-noble +image: mcr.microsoft.com/playwright/dotnet:v1.64.1-noble ``` ### GitLab CI diff --git a/dotnet/docs/docker.mdx b/dotnet/docs/docker.mdx index 3bfb8a302f..deb21cf97d 100644 --- a/dotnet/docs/docker.mdx +++ b/dotnet/docs/docker.mdx @@ -22,7 +22,7 @@ This Docker image is intended to be used for testing and development purposes on ### Pull the image ```bash -docker pull mcr.microsoft.com/playwright/dotnet:v1.63.0-noble +docker pull mcr.microsoft.com/playwright/dotnet:v1.64.1-noble ``` ### Run the image @@ -34,7 +34,7 @@ By default, the Docker image will use the `root` user to run the browsers. This On trusted websites, you can avoid creating a separate user and use root for it since you trust the code which will run on the browsers. ```bash -docker run -it --rm --ipc=host mcr.microsoft.com/playwright/dotnet:v1.63.0-noble /bin/bash +docker run -it --rm --ipc=host mcr.microsoft.com/playwright/dotnet:v1.64.1-noble /bin/bash ``` #### Crawling and scraping @@ -42,7 +42,7 @@ docker run -it --rm --ipc=host mcr.microsoft.com/playwright/dotnet:v1.63.0-noble On untrusted websites, it's recommended to use a separate user for launching the browsers in combination with the seccomp profile. Inside the container or if you are using the Docker image as a base image you have to use `adduser` for it. ```bash -docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/dotnet:v1.63.0-noble /bin/bash +docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/dotnet:v1.64.1-noble /bin/bash ``` [`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions: @@ -82,7 +82,7 @@ You can run Playwright Server in Docker while keeping your tests running on the Start the Playwright Server in Docker: ```bash -docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.63.0-noble /bin/sh -c "npx -y playwright@1.63.0 run-server --port 3000 --host 0.0.0.0" +docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.64.1-noble /bin/sh -c "npx -y playwright@1.64.1 run-server --port 3000 --host 0.0.0.0" ``` #### Connecting to the Server @@ -99,7 +99,7 @@ await using var browser = await playwright.Chromium.ConnectAsync("ws://127.0.0.1 If you need to access local servers from within the Docker container: ```bash -docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.63.0-noble /bin/sh -c "npx -y playwright@1.63.0 run-server --port 3000 --host 0.0.0.0" +docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.64.1-noble /bin/sh -c "npx -y playwright@1.64.1 run-server --port 3000 --host 0.0.0.0" ``` This makes `hostmachine` point to the host's localhost. Your tests should use `hostmachine` instead of `localhost` when accessing local servers. @@ -115,7 +115,7 @@ For Docker and GitHub Codespaces environments, you can view and generate tests u ```json { - "image": "mcr.microsoft.com/playwright:v1.57.0", + "image": "mcr.microsoft.com/playwright:v1.64.1-noble", "forwardPorts": [6080], "features": { "desktop-lite": { @@ -132,10 +132,10 @@ Once this is enabled you can open the port specified in a new browser tab and yo See [all available image tags]. We currently publish images with the following tags: -- `:v1.63.0` - Playwright v1.63.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.63.0-noble` - Playwright v1.63.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.63.0-jammy` - Playwright v1.63.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish). -- `:v1.63.0-resolute` - Playwright v1.63.0 release docker image based on Ubuntu 26.04 LTS (Resolute Raccoon). +- `:v1.64.1` - Playwright v1.64.1 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). +- `:v1.64.1-noble` - Playwright v1.64.1 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). +- `:v1.64.1-jammy` - Playwright v1.64.1 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish). +- `:v1.64.1-resolute` - Playwright v1.64.1 release docker image based on Ubuntu 26.04 LTS (Resolute Raccoon). :::note diff --git a/dotnet/docs/emulation.mdx b/dotnet/docs/emulation.mdx index 09e9417001..5b64818e36 100644 --- a/dotnet/docs/emulation.mdx +++ b/dotnet/docs/emulation.mdx @@ -160,6 +160,26 @@ await page.EmulateMediaAsync(new() playwright web in dark mode +The `"reducedMotion"`, `"forcedColors"` and `"contrast"` options emulate the `prefers-reduced-motion`, `forced-colors` and `prefers-contrast` media features the same way. Supported values are `'reduce'` and `'no-preference'` for reduced motion, `'active'` and `'none'` for forced colors, and `'more'` and `'no-preference'` for contrast. [Page.EmulateMediaAsync()](/api/class-page.mdx#page-emulate-media) changes them for a single page. + +```csharp +// Create context with reduced motion, forced colors and more contrast +await using var context = await browser.NewContextAsync(new() +{ + ReducedMotion = ReducedMotion.Reduce, // or NoPreference + ForcedColors = ForcedColors.Active, // or None + Contrast = Contrast.More // or NoPreference +}); + +// Change the media features for the page +await page.EmulateMediaAsync(new() +{ + ReducedMotion = ReducedMotion.Reduce, + ForcedColors = ForcedColors.Active, + Contrast = Contrast.More +}); +``` + ## User Agent The User Agent is included in the device and therefore you will rarely need to change it however if you do need to test a different user agent you can override it with the `userAgent` property. diff --git a/dotnet/docs/getting-started-mcp.mdx b/dotnet/docs/getting-started-mcp.mdx index 72488cdad7..5e349945cd 100644 --- a/dotnet/docs/getting-started-mcp.mdx +++ b/dotnet/docs/getting-started-mcp.mdx @@ -201,7 +201,7 @@ A page that keeps animating or rendering costs CPU for as long as the browser is ``` When no tool call has completed for that long, the browser is closed, headed or not, the same way as if you had closed it by hand. The next tool call launches a new browser, so the agent navigates again. The timer never fires while a tool call is running. -- With `--isolated`, cookies and storage kept in memory are lost on an idle close. Use the persistent profile or `--storage-state` to keep them. +- With `--isolated`, cookies and storage kept in memory are lost on an idle close. Use the persistent profile or `--storage-state` to keep them. Each client has its own timer: the context of an idle client is closed while other clients keep working, and the browser is closed once no client has a context. - With `--cdp-endpoint` or `--extension`, the browser is not owned by the server, so there is no default timeout, and an explicit one only disconnects from it, leaving its pages open. With `--extension`, the next tool call goes through the connect flow again. - With `--shared-browser-context`, the timer spans all clients: a client that is idle while others keep working keeps its tabs and state, and the shared browser is closed only once every client has been idle for the timeout. diff --git a/dotnet/docs/navigations.mdx b/dotnet/docs/navigations.mdx index b6235fb498..2788b7d57e 100644 --- a/dotnet/docs/navigations.mdx +++ b/dotnet/docs/navigations.mdx @@ -26,6 +26,10 @@ The code above loads the page and waits for the web page to fire the [load](http If the page does a client-side redirect before `load`, [Page.GotoAsync()](/api/class-page.mdx#page-goto) will wait for the redirected page to fire the `load` event. ::: +:::note +In Firefox, a navigation triggered by the page can interrupt [Page.GotoAsync()](/api/class-page.mdx#page-goto) with an `NS_BINDING_ABORTED` error. This is a [known Firefox limitation](https://github.com/microsoft/playwright/issues/20749). +::: + ## When is the page loaded? Modern pages perform numerous activities after the `load` event was fired. They fetch data lazily, populate UI, load expensive resources, scripts and styles after the `load` event was fired. There is no way to tell that the page is `loaded`, it depends on the page, framework, etc. So when can you start interacting with it? diff --git a/dotnet/docs/release-notes.mdx b/dotnet/docs/release-notes.mdx index a59e491ee4..8e32c35380 100644 --- a/dotnet/docs/release-notes.mdx +++ b/dotnet/docs/release-notes.mdx @@ -9,6 +9,107 @@ import HTMLCard from '@site/src/components/HTMLCard'; import LiteYouTube from '@site/src/components/LiteYouTube'; +## Version 1.64 + +### 🧰 WebMCP + +New [Page.Webmcp](/api/class-page.mdx#page-webmcp) and [Frame.Webmcp](/api/class-frame.mdx#frame-webmcp) give access to the tools that a page registers through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) browser API, so you can test them like any other part of your app: + +```csharp +var browser = await playwright.Chromium.LaunchAsync(new() { Args = new[] { "--enable-features=WebMCP" } }); +var page = await browser.NewPageAsync(); +await page.GotoAsync("https://example.com"); + +foreach (var tool in await page.Webmcp.ToolsAsync()) + Console.WriteLine($"{tool.Name}: {tool.Description}"); + +var result = await page.Webmcp.CallToolAsync("add", new { a = 2, b = 40 }); +Console.WriteLine(result?.GetProperty("content")[0].GetProperty("text")); // "42" +``` + +[Playwright MCP](./getting-started-mcp.mdx) also supports WebMCP by default, with page-defined tools offered to the agent as `webmcp_`. Pass `--no-webmcp` to opt out. + +[`playwright-cli`](./getting-started-cli.mdx) exposes them as well: + +```bash +playwright-cli webmcp-list +playwright-cli webmcp-call search_catalog --params '{"query":"cats"}' +``` + +### 🎬 Better videos + +Videos can now be recorded at a custom frame rate, and the decorations for actions are styled with plain CSS: + +```csharp +await page.Screencast.StartAsync(new() +{ + Path = "video.webm", + Size = new() { Width = 1920, Height = 1080 }, + Fps = 60, +}); +await page.Screencast.ShowActionsAsync(new() +{ + Style = new() + { + Point = "width: 20px; height: 20px; border-radius: 50%; background: red", + Highlight = "outline: 2px solid #333; background: rgba(0, 128, 255, .15)", + Title = "font-size: 16px", + }, +}); +``` + +- New [RecordVideoFps](/api/class-browser.mdx#browser-new-context-option-record-video-fps) option and new [Fps](/api/class-screencast.mdx#screencast-start-option-fps) option in [Screencast.StartAsync()](/api/class-screencast.mdx#screencast-start). Firefox and WebKit currently capture up to 25 frames per second. +- New [Style](/api/class-screencast.mdx#screencast-show-actions-option-style) option takes CSS declarations for the `point` marker, the target `highlight` and the action `title`. It replaces the `FontSize` option, which is now deprecated. +- The cursor stays visible at the last action point, survives navigations and travels along a natural, eased path. +- Videos are encoded with VP9 instead of VP8, which takes less CPU and produces smaller files of the same or better quality. +- All video options are also available in [Playwright MCP](./getting-started-mcp.mdx) and [`playwright-cli`](./getting-started-cli.mdx). + +### 🪆 Locator.within() + +New [Locator.Within()](/api/class-locator.mdx#locator-within) combines two locators that you already have, reading in the natural order — "this button, within that dialog": + +```csharp +var saveButton = page.GetByRole(AriaRole.Button, new() { Name = "Save" }); +var dialog = page.GetByTestId("settings-dialog"); + +await saveButton.Within(dialog).ClickAsync(); +``` + +Relative locators such as [Locator.Nth()](/api/class-locator.mdx#locator-nth) or [Locator.First](/api/class-locator.mdx#locator-first) are resolved inside each parent separately, which makes column-like queries straightforward: + +```csharp +// The third cell of every row, not the third cell in the table. +var thirdColumn = page.GetByRole(AriaRole.Cell).Nth(2).Within(page.GetByRole(AriaRole.Row)); +await Expect(thirdColumn).ToHaveTextAsync(new[] { "Apple", "Banana", "Cherry" }); +``` + +### New APIs +- New [Page.GetByRef()](/api/class-page.mdx#page-get-by-ref) locates an element by its aria ref, such as `e2`, reported by [Page.AriaSnapshotAsync()](/api/class-page.mdx#page-aria-snapshot) in the `"ai"` mode. +- New option [IncludeShadow](/api/class-page.mdx#page-content-option-include-shadow) in [Page.ContentAsync()](/api/class-page.mdx#page-content) and [Frame.ContentAsync()](/api/class-frame.mdx#frame-content) serializes open shadow roots as [declarative shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#declaratively_with_html). +- New option [SignCount](/api/class-credentials.mdx#credentials-create-option-sign-count) sets the initial signature counter of a virtual credential. [Credentials.CreateAsync()](/api/class-credentials.mdx#credentials-create) and [Credentials.GetAsync()](/api/class-credentials.mdx#credentials-get) return the current `SignCount`, and it is saved and restored together with the credentials in the storage state. +- New [ApiRequestContext.AddCookiesAsync()](/api/class-apirequestcontext.mdx#api-request-context-add-cookies), [ApiRequestContext.CookiesAsync()](/api/class-apirequestcontext.mdx#api-request-context-cookies) and [ApiRequestContext.ClearCookiesAsync()](/api/class-apirequestcontext.mdx#api-request-context-clear-cookies) manage cookies of a request context, mirroring the [BrowserContext] methods: + + ```csharp + await request.AddCookiesAsync(new[] + { + new Cookie { Name = "session-id", Value = "42", Url = "https://example.com" }, + }); + Console.WriteLine(await request.CookiesAsync("https://example.com")); + await request.ClearCookiesAsync(new() { Name = "session-id" }); + ``` + +### Breaking Changes ⚠️ +- Elements inside hidden iframes are considered hidden. Elements inside an iframe that is not visible, for example with `visibility: hidden`, are now considered hidden by actions, [Locator.IsVisibleAsync()](/api/class-locator.mdx#locator-is-visible) and [Expect(Locator).ToBeVisibleAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-be-visible). + +### Browser Versions +- Chromium 156.0.8078.4 +- Mozilla Firefox 157.0 +- WebKit 27.2 + +This version was also tested against the following stable channels: +- Google Chrome 155 +- Microsoft Edge 155 + ## Version 1.63 ### 🪟 Locate across frames diff --git a/java/docs/accessibility-testing.mdx b/java/docs/accessibility-testing.mdx index b9666c0d29..45601499a9 100644 --- a/java/docs/accessibility-testing.mdx +++ b/java/docs/accessibility-testing.mdx @@ -303,6 +303,7 @@ See experimental [JUnit integration](./junit.mdx) to automatically initialize Pl [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -310,6 +311,7 @@ See experimental [JUnit integration](./junit.mdx) to automatically initialize Pl [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/actionability.mdx b/java/docs/actionability.mdx index d5a07b9781..2306aebea6 100644 --- a/java/docs/actionability.mdx +++ b/java/docs/actionability.mdx @@ -190,6 +190,7 @@ For example, consider a scenario where Playwright will click `Sign Up` button re [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -197,6 +198,7 @@ For example, consider a scenario where Playwright will click `Sign Up` button re [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api-testing.mdx b/java/docs/api-testing.mdx index e29cf12707..7fbf73ec74 100644 --- a/java/docs/api-testing.mdx +++ b/java/docs/api-testing.mdx @@ -504,6 +504,7 @@ BrowserContext context = browser.newContext(new Browser.NewContextOptions().setS [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -511,6 +512,7 @@ BrowserContext context = browser.newContext(new Browser.NewContextOptions().setS [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-apirequest.mdx b/java/docs/api/class-apirequest.mdx index 0006d69cc7..376ef45605 100644 --- a/java/docs/api/class-apirequest.mdx +++ b/java/docs/api/class-apirequest.mdx @@ -192,6 +192,7 @@ APIRequest.newContext(options); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -199,6 +200,7 @@ APIRequest.newContext(options); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-apirequestcontext.mdx b/java/docs/api/class-apirequestcontext.mdx index b6817c0dca..bd0b835248 100644 --- a/java/docs/api/class-apirequestcontext.mdx +++ b/java/docs/api/class-apirequestcontext.mdx @@ -524,6 +524,7 @@ APIRequestContext.tracing() [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -531,6 +532,7 @@ APIRequestContext.tracing() [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-apiresponse.mdx b/java/docs/api/class-apiresponse.mdx index 1cc10a97ed..50916faa1b 100644 --- a/java/docs/api/class-apiresponse.mdx +++ b/java/docs/api/class-apiresponse.mdx @@ -327,6 +327,7 @@ APIResponse.url(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -334,6 +335,7 @@ APIResponse.url(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-apiresponseassertions.mdx b/java/docs/api/class-apiresponseassertions.mdx index c330c492c7..8b556cbb85 100644 --- a/java/docs/api/class-apiresponseassertions.mdx +++ b/java/docs/api/class-apiresponseassertions.mdx @@ -123,6 +123,7 @@ assertThat(response).not().isOK(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -130,6 +131,7 @@ assertThat(response).not().isOK(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-browser.mdx b/java/docs/api/class-browser.mdx index a9d38b6312..64d0b3aa0f 100644 --- a/java/docs/api/class-browser.mdx +++ b/java/docs/api/class-browser.mdx @@ -827,6 +827,7 @@ Browser.onDisconnected(handler) [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -834,6 +835,7 @@ Browser.onDisconnected(handler) [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-browsercontext.mdx b/java/docs/api/class-browsercontext.mdx index 7fcea00a50..b0d0aaabf3 100644 --- a/java/docs/api/class-browsercontext.mdx +++ b/java/docs/api/class-browsercontext.mdx @@ -640,12 +640,12 @@ Below is an example of a simple handler that blocks some websocket messages. See ```java context.routeWebSocket("/ws", ws -> { - ws.routeSend(message -> { - if ("to-be-blocked".equals(message)) + WebSocketRoute server = ws.connectToServer(); + ws.onMessage(frame -> { + if ("to-be-blocked".equals(frame.text())) return; - ws.send(message); + server.send(frame.text()); }); - ws.connect(); }); ``` @@ -1502,6 +1502,7 @@ BrowserContext.backgroundPages(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -1509,6 +1510,7 @@ BrowserContext.backgroundPages(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-browsertype.mdx b/java/docs/api/class-browsertype.mdx index 84babefe92..79cefdb732 100644 --- a/java/docs/api/class-browsertype.mdx +++ b/java/docs/api/class-browsertype.mdx @@ -632,6 +632,7 @@ BrowserType.name(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -639,6 +640,7 @@ BrowserType.name(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-cdpsession.mdx b/java/docs/api/class-cdpsession.mdx index b41e32965b..a7ad279bfc 100644 --- a/java/docs/api/class-cdpsession.mdx +++ b/java/docs/api/class-cdpsession.mdx @@ -104,7 +104,7 @@ CDPSession.on(eventName, handler); ```java CDPSession.send(method); -CDPSession.send(method, args); +CDPSession.send(method, args, options); ``` **Arguments** @@ -114,6 +114,10 @@ CDPSession.send(method, args); - `args` [JsonObject] *(optional)* Added in: v1.37# Optional method parameters. +- `options` `CdpSession.SendOptions` *(optional)* + - `setTimeout` [double] *(optional)* Added in: v1.65# + + Maximum time in milliseconds to wait for the response. Defaults to `0` - no timeout. **Returns** - [JsonObject]# @@ -195,6 +199,7 @@ CDPSession.onClose(handler) [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -202,6 +207,7 @@ CDPSession.onClose(handler) [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-clock.mdx b/java/docs/api/class-clock.mdx index d7ec69d9fe..87285a4682 100644 --- a/java/docs/api/class-clock.mdx +++ b/java/docs/api/class-clock.mdx @@ -32,7 +32,7 @@ page.clock().fastForward("30:00"); **Arguments** - `ticks` [long] | [String]# - Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. + Time may be a finite number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. **Returns** - [void]# @@ -146,7 +146,7 @@ page.clock().runFor("30:00"); **Arguments** - `ticks` [long] | [String]# - Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. + Time may be a finite number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. **Returns** - [void]# @@ -259,6 +259,7 @@ page.clock().setSystemTime("2020-02-02"); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -266,6 +267,7 @@ page.clock().setSystemTime("2020-02-02"); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-consolemessage.mdx b/java/docs/api/class-consolemessage.mdx index 34a5ccb817..12c724ee7d 100644 --- a/java/docs/api/class-consolemessage.mdx +++ b/java/docs/api/class-consolemessage.mdx @@ -210,6 +210,7 @@ ConsoleMessage.worker(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -217,6 +218,7 @@ ConsoleMessage.worker(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-credentials.mdx b/java/docs/api/class-credentials.mdx index a4d5b9bcab..89c36fcf02 100644 --- a/java/docs/api/class-credentials.mdx +++ b/java/docs/api/class-credentials.mdx @@ -281,6 +281,7 @@ Credentials.install(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -288,6 +289,7 @@ Credentials.install(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-debugger.mdx b/java/docs/api/class-debugger.mdx index d646bb53df..3e7f97b617 100644 --- a/java/docs/api/class-debugger.mdx +++ b/java/docs/api/class-debugger.mdx @@ -201,6 +201,7 @@ Debugger.onPausedStateChanged(handler) [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -208,6 +209,7 @@ Debugger.onPausedStateChanged(handler) [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-dialog.mdx b/java/docs/api/class-dialog.mdx index 6b37869d42..96f8141791 100644 --- a/java/docs/api/class-dialog.mdx +++ b/java/docs/api/class-dialog.mdx @@ -204,6 +204,7 @@ Dialog.type(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -211,6 +212,7 @@ Dialog.type(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-download.mdx b/java/docs/api/class-download.mdx index fb9b864689..d2ba3dec99 100644 --- a/java/docs/api/class-download.mdx +++ b/java/docs/api/class-download.mdx @@ -250,6 +250,7 @@ Download.url(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -257,6 +258,7 @@ Download.url(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-elementhandle.mdx b/java/docs/api/class-elementhandle.mdx index 9aefd75276..1ef5400af4 100644 --- a/java/docs/api/class-elementhandle.mdx +++ b/java/docs/api/class-elementhandle.mdx @@ -1670,6 +1670,7 @@ This method does not work across navigations, use [Page.waitForSelector()](/api/ [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -1677,6 +1678,7 @@ This method does not work across navigations, use [Page.waitForSelector()](/api/ [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-filechooser.mdx b/java/docs/api/class-filechooser.mdx index 73c2b2d1c4..cc7a01ea87 100644 --- a/java/docs/api/class-filechooser.mdx +++ b/java/docs/api/class-filechooser.mdx @@ -168,6 +168,7 @@ FileChooser.setFiles(files, options); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -175,6 +176,7 @@ FileChooser.setFiles(files, options); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-formdata.mdx b/java/docs/api/class-formdata.mdx index 19f8ee94cf..38fa724a58 100644 --- a/java/docs/api/class-formdata.mdx +++ b/java/docs/api/class-formdata.mdx @@ -194,6 +194,7 @@ FormData.set(name, value); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -201,6 +202,7 @@ FormData.set(name, value); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-frame.mdx b/java/docs/api/class-frame.mdx index 24dbd8deec..e866393a5a 100644 --- a/java/docs/api/class-frame.mdx +++ b/java/docs/api/class-frame.mdx @@ -2784,6 +2784,7 @@ Frame.waitForTimeout(timeout); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -2791,6 +2792,7 @@ Frame.waitForTimeout(timeout); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-framelocator.mdx b/java/docs/api/class-framelocator.mdx index e03a017a48..a9d4895ae9 100644 --- a/java/docs/api/class-framelocator.mdx +++ b/java/docs/api/class-framelocator.mdx @@ -609,6 +609,7 @@ FrameLocator.nth(index); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -616,6 +617,7 @@ FrameLocator.nth(index); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-jshandle.mdx b/java/docs/api/class-jshandle.mdx index d69afeeca9..2a1aafb90d 100644 --- a/java/docs/api/class-jshandle.mdx +++ b/java/docs/api/class-jshandle.mdx @@ -242,6 +242,7 @@ JSHandle.jsonValue(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -249,6 +250,7 @@ JSHandle.jsonValue(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-keyboard.mdx b/java/docs/api/class-keyboard.mdx index 92e623f464..14306f9c86 100644 --- a/java/docs/api/class-keyboard.mdx +++ b/java/docs/api/class-keyboard.mdx @@ -283,6 +283,7 @@ Keyboard.up(key); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -290,6 +291,7 @@ Keyboard.up(key); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-locator.mdx b/java/docs/api/class-locator.mdx index f3c465a870..133fd9efec 100644 --- a/java/docs/api/class-locator.mdx +++ b/java/docs/api/class-locator.mdx @@ -2804,6 +2804,7 @@ To press a special key, like `Control` or `ArrowDown`, use [Locator.press()](/ap [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -2811,6 +2812,7 @@ To press a special key, like `Control` or `ArrowDown`, use [Locator.press()](/ap [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-locatorassertions.mdx b/java/docs/api/class-locatorassertions.mdx index 5c5284360d..97aa2caaf9 100644 --- a/java/docs/api/class-locatorassertions.mdx +++ b/java/docs/api/class-locatorassertions.mdx @@ -942,6 +942,7 @@ assertThat(locator).not().containsText("error"); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -949,6 +950,7 @@ assertThat(locator).not().containsText("error"); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-mouse.mdx b/java/docs/api/class-mouse.mdx index a4be889eab..8586990d90 100644 --- a/java/docs/api/class-mouse.mdx +++ b/java/docs/api/class-mouse.mdx @@ -271,6 +271,7 @@ Mouse.wheel(deltaX, deltaY); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -278,6 +279,7 @@ Mouse.wheel(deltaX, deltaY); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-page.mdx b/java/docs/api/class-page.mdx index 102e38e956..560e7ba7e2 100644 --- a/java/docs/api/class-page.mdx +++ b/java/docs/api/class-page.mdx @@ -5072,6 +5072,7 @@ page.waitForTimeout(1000); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -5079,6 +5080,7 @@ page.waitForTimeout(1000); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-pageassertions.mdx b/java/docs/api/class-pageassertions.mdx index f601f4dbba..55d30c5e94 100644 --- a/java/docs/api/class-pageassertions.mdx +++ b/java/docs/api/class-pageassertions.mdx @@ -189,6 +189,7 @@ assertThat(page).not().hasURL("error"); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -196,6 +197,7 @@ assertThat(page).not().hasURL("error"); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-playwright.mdx b/java/docs/api/class-playwright.mdx index e6470f791f..62ffa48faa 100644 --- a/java/docs/api/class-playwright.mdx +++ b/java/docs/api/class-playwright.mdx @@ -220,6 +220,7 @@ Playwright.webkit() [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -227,6 +228,7 @@ Playwright.webkit() [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-playwrightassertions.mdx b/java/docs/api/class-playwrightassertions.mdx index 40053df2d2..ddda8e947c 100644 --- a/java/docs/api/class-playwrightassertions.mdx +++ b/java/docs/api/class-playwrightassertions.mdx @@ -175,6 +175,7 @@ PlaywrightAssertions.setDefaultAssertionTimeout(30_000); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -182,6 +183,7 @@ PlaywrightAssertions.setDefaultAssertionTimeout(30_000); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-playwrightexception.mdx b/java/docs/api/class-playwrightexception.mdx index 65d32f6809..be03fffe34 100644 --- a/java/docs/api/class-playwrightexception.mdx +++ b/java/docs/api/class-playwrightexception.mdx @@ -69,6 +69,7 @@ PlaywrightException is thrown whenever certain operations are terminated abnorma [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -76,6 +77,7 @@ PlaywrightException is thrown whenever certain operations are terminated abnorma [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-request.mdx b/java/docs/api/class-request.mdx index db108fe4bf..17477b6ce7 100644 --- a/java/docs/api/class-request.mdx +++ b/java/docs/api/class-request.mdx @@ -472,6 +472,7 @@ Request.url(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -479,6 +480,7 @@ Request.url(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-requestoptions.mdx b/java/docs/api/class-requestoptions.mdx index bdcf73da91..5fe583618c 100644 --- a/java/docs/api/class-requestoptions.mdx +++ b/java/docs/api/class-requestoptions.mdx @@ -363,6 +363,7 @@ RequestOptions.setTimeout(timeout); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -370,6 +371,7 @@ RequestOptions.setTimeout(timeout); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-response.mdx b/java/docs/api/class-response.mdx index feb74b58dc..81f38258a6 100644 --- a/java/docs/api/class-response.mdx +++ b/java/docs/api/class-response.mdx @@ -412,6 +412,7 @@ Response.url(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -419,6 +420,7 @@ Response.url(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-route.mdx b/java/docs/api/class-route.mdx index 3707b0e395..2ee0ace423 100644 --- a/java/docs/api/class-route.mdx +++ b/java/docs/api/class-route.mdx @@ -370,6 +370,7 @@ To set custom cookies, use [BrowserContext.addCookies()](/api/class-browserconte [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -377,6 +378,7 @@ To set custom cookies, use [BrowserContext.addCookies()](/api/class-browserconte [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-screencast.mdx b/java/docs/api/class-screencast.mdx index 1822b0d593..d628f02846 100644 --- a/java/docs/api/class-screencast.mdx +++ b/java/docs/api/class-screencast.mdx @@ -308,6 +308,7 @@ Screencast.stop(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -315,6 +316,7 @@ Screencast.stop(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-selectors.mdx b/java/docs/api/class-selectors.mdx index f92e3d15cd..003db09234 100644 --- a/java/docs/api/class-selectors.mdx +++ b/java/docs/api/class-selectors.mdx @@ -142,6 +142,7 @@ Selectors.setTestIdAttribute(attributeName); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -149,6 +150,7 @@ Selectors.setTestIdAttribute(attributeName); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-timeouterror.mdx b/java/docs/api/class-timeouterror.mdx index 99cc7541cb..dae72209f2 100644 --- a/java/docs/api/class-timeouterror.mdx +++ b/java/docs/api/class-timeouterror.mdx @@ -90,6 +90,7 @@ public class TimeoutErrorExample { [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -97,6 +98,7 @@ public class TimeoutErrorExample { [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-touchscreen.mdx b/java/docs/api/class-touchscreen.mdx index 55aca409cb..f6572edcc2 100644 --- a/java/docs/api/class-touchscreen.mdx +++ b/java/docs/api/class-touchscreen.mdx @@ -102,6 +102,7 @@ Touchscreen.tap(x, y); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -109,6 +110,7 @@ Touchscreen.tap(x, y); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-tracing.mdx b/java/docs/api/class-tracing.mdx index baca8bbaf3..d537d10f08 100644 --- a/java/docs/api/class-tracing.mdx +++ b/java/docs/api/class-tracing.mdx @@ -353,6 +353,7 @@ Tracing.stopHar(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -360,6 +361,7 @@ Tracing.stopHar(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-video.mdx b/java/docs/api/class-video.mdx index 9a63ddcee9..9d7c571cc6 100644 --- a/java/docs/api/class-video.mdx +++ b/java/docs/api/class-video.mdx @@ -130,6 +130,7 @@ Video.saveAs(path); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -137,6 +138,7 @@ Video.saveAs(path); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-weberror.mdx b/java/docs/api/class-weberror.mdx index 5d826e7a6b..aa3910017f 100644 --- a/java/docs/api/class-weberror.mdx +++ b/java/docs/api/class-weberror.mdx @@ -138,6 +138,7 @@ WebError.page(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -145,6 +146,7 @@ WebError.page(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-webmcp.mdx b/java/docs/api/class-webmcp.mdx index 9f2bcb9750..d8c24f7e81 100644 --- a/java/docs/api/class-webmcp.mdx +++ b/java/docs/api/class-webmcp.mdx @@ -156,6 +156,7 @@ WebMCP.tools(options); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -163,6 +164,7 @@ WebMCP.tools(options); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-websocket.mdx b/java/docs/api/class-websocket.mdx index 3d8fd21160..26aa55640a 100644 --- a/java/docs/api/class-websocket.mdx +++ b/java/docs/api/class-websocket.mdx @@ -236,6 +236,7 @@ WebSocket.onSocketError(handler) [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -243,6 +244,7 @@ WebSocket.onSocketError(handler) [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-websocketframe.mdx b/java/docs/api/class-websocketframe.mdx index b2197404e3..4e7afcd939 100644 --- a/java/docs/api/class-websocketframe.mdx +++ b/java/docs/api/class-websocketframe.mdx @@ -104,6 +104,7 @@ WebSocketFrame.text(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -111,6 +112,7 @@ WebSocketFrame.text(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-websocketroute.mdx b/java/docs/api/class-websocketroute.mdx index 64c7d2c14b..25b1082501 100644 --- a/java/docs/api/class-websocketroute.mdx +++ b/java/docs/api/class-websocketroute.mdx @@ -149,7 +149,7 @@ WebSocketRoute.onClose(handler); ``` **Arguments** -- `handler` [Consumer]<># +- `handler` [BiConsumer]<[Integer], [String]># Function that will handle WebSocket closure. Received an optional [close code](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code) and an optional [close reason](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#reason). @@ -297,6 +297,7 @@ WebSocketRoute.url(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -304,6 +305,7 @@ WebSocketRoute.url(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-webstorage.mdx b/java/docs/api/class-webstorage.mdx index 41cf2d809c..020f2092ef 100644 --- a/java/docs/api/class-webstorage.mdx +++ b/java/docs/api/class-webstorage.mdx @@ -189,6 +189,7 @@ WebStorage.setItem(name, value); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -196,6 +197,7 @@ WebStorage.setItem(name, value); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/api/class-worker.mdx b/java/docs/api/class-worker.mdx index a6ba444ed2..c419a4d6b3 100644 --- a/java/docs/api/class-worker.mdx +++ b/java/docs/api/class-worker.mdx @@ -248,6 +248,7 @@ Worker.onConsole(handler) [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -255,6 +256,7 @@ Worker.onConsole(handler) [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/aria-snapshots.mdx b/java/docs/aria-snapshots.mdx index a53aa721df..50539609b0 100644 --- a/java/docs/aria-snapshots.mdx +++ b/java/docs/aria-snapshots.mdx @@ -451,6 +451,7 @@ The `aria-invalid` value is surfaced directly. A value of `true` renders as `[in [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -458,6 +459,7 @@ The `aria-invalid` value is surfaced directly. A value of `true` renders as `[in [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/auth.mdx b/java/docs/auth.mdx index 76fdbb2c91..4c3837040d 100644 --- a/java/docs/auth.mdx +++ b/java/docs/auth.mdx @@ -177,6 +177,7 @@ context.addInitScript("(storage => {\n" + [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -184,6 +185,7 @@ context.addInitScript("(storage => {\n" + [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/browser-contexts.mdx b/java/docs/browser-contexts.mdx index 48aed8a8af..69d22ccfad 100644 --- a/java/docs/browser-contexts.mdx +++ b/java/docs/browser-contexts.mdx @@ -115,6 +115,7 @@ public class Example { [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -122,6 +123,7 @@ public class Example { [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/browsers.mdx b/java/docs/browsers.mdx index daa8eede96..8dbe503b63 100644 --- a/java/docs/browsers.mdx +++ b/java/docs/browsers.mdx @@ -674,6 +674,7 @@ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="un [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -681,6 +682,7 @@ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="un [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/ci-intro.mdx b/java/docs/ci-intro.mdx index ad334f2e3b..a3381e1610 100644 --- a/java/docs/ci-intro.mdx +++ b/java/docs/ci-intro.mdx @@ -149,6 +149,7 @@ Artifacts like trace files or console logs contain information about your test e [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -156,6 +157,7 @@ Artifacts like trace files or console logs contain information about your test e [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/ci.mdx b/java/docs/ci.mdx index dae859cffd..eb86be047a 100644 --- a/java/docs/ci.mdx +++ b/java/docs/ci.mdx @@ -74,7 +74,7 @@ jobs: name: 'Playwright Tests' runs-on: ubuntu-latest container: - image: mcr.microsoft.com/playwright/java:v1.63.0-noble + image: mcr.microsoft.com/playwright/java:v1.64.0-noble options: --user 1001 steps: - uses: actions/checkout@v6 @@ -158,7 +158,7 @@ trigger: pool: vmImage: ubuntu-latest -container: mcr.microsoft.com/playwright/java:v1.63.0-noble +container: mcr.microsoft.com/playwright/java:v1.64.0-noble steps: - task: JavaToolInstaller@1 @@ -181,7 +181,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In executors: pw-noble-development: docker: - - image: mcr.microsoft.com/playwright/java:v1.63.0-noble + - image: mcr.microsoft.com/playwright/java:v1.64.0-noble ``` Note: When using the docker agent definition, you are specifying the resource class of where playwright runs to the 'medium' tier [here](https://circleci.com/docs/configuration-reference?#docker-execution-environment). The default behavior of Playwright is to set the number of workers to the detected core count (2 in the case of the medium tier). Overriding the number of workers to greater than this number will cause unnecessary timeouts and failures. @@ -192,7 +192,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image]( ```groovy pipeline { - agent { docker { image 'mcr.microsoft.com/playwright/java:v1.63.0-noble' } } + agent { docker { image 'mcr.microsoft.com/playwright/java:v1.64.0-noble' } } stages { stage('e2e-tests') { steps { @@ -209,7 +209,7 @@ pipeline { Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](./docker.mdx)). ```yml -image: mcr.microsoft.com/playwright/java:v1.63.0-noble +image: mcr.microsoft.com/playwright/java:v1.64.0-noble ``` ### GitLab CI @@ -222,7 +222,7 @@ stages: tests: stage: test - image: mcr.microsoft.com/playwright/java:v1.63.0-noble + image: mcr.microsoft.com/playwright/java:v1.64.0-noble script: ... ``` @@ -309,6 +309,7 @@ xvfb-run mvn test [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -316,6 +317,7 @@ xvfb-run mvn test [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/clock.mdx b/java/docs/clock.mdx index 7cbebe5939..bdf4d1f771 100644 --- a/java/docs/clock.mdx +++ b/java/docs/clock.mdx @@ -243,6 +243,7 @@ assertThat(locator).hasText("2/2/2024, 10:00:02 AM"); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -250,6 +251,7 @@ assertThat(locator).hasText("2/2/2024, 10:00:02 AM"); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/codegen-intro.mdx b/java/docs/codegen-intro.mdx index 149594e473..4a643d9ca3 100644 --- a/java/docs/codegen-intro.mdx +++ b/java/docs/codegen-intro.mdx @@ -120,6 +120,7 @@ You can generate tests using emulation for specific viewports, devices, color sc [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -127,6 +128,7 @@ You can generate tests using emulation for specific viewports, devices, color sc [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/codegen.mdx b/java/docs/codegen.mdx index abb783ecca..95e9d42ffe 100644 --- a/java/docs/codegen.mdx +++ b/java/docs/codegen.mdx @@ -237,6 +237,7 @@ public class Example { [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -244,6 +245,7 @@ public class Example { [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/debug.mdx b/java/docs/debug.mdx index 90ee080d31..60c746b840 100644 --- a/java/docs/debug.mdx +++ b/java/docs/debug.mdx @@ -333,6 +333,7 @@ chromium.launch(new BrowserType.LaunchOptions() [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -340,6 +341,7 @@ chromium.launch(new BrowserType.LaunchOptions() [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/dialogs.mdx b/java/docs/dialogs.mdx index e198da79a1..1205479fee 100644 --- a/java/docs/dialogs.mdx +++ b/java/docs/dialogs.mdx @@ -126,6 +126,7 @@ This will wait for the print dialog to be opened after the button is clicked. Ma [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -133,6 +134,7 @@ This will wait for the print dialog to be opened after the button is clicked. Ma [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/docker.mdx b/java/docs/docker.mdx index 0030ba837f..68ff43d1cb 100644 --- a/java/docs/docker.mdx +++ b/java/docs/docker.mdx @@ -22,7 +22,7 @@ This Docker image is intended to be used for testing and development purposes on ### Pull the image ```bash -docker pull mcr.microsoft.com/playwright/java:v1.63.0-noble +docker pull mcr.microsoft.com/playwright/java:v1.64.0-noble ``` ### Run the image @@ -34,7 +34,7 @@ By default, the Docker image will use the `root` user to run the browsers. This On trusted websites, you can avoid creating a separate user and use root for it since you trust the code which will run on the browsers. ```bash -docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.63.0-noble /bin/bash +docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.64.0-noble /bin/bash ``` #### Crawling and scraping @@ -42,7 +42,7 @@ docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.63.0-noble / On untrusted websites, it's recommended to use a separate user for launching the browsers in combination with the seccomp profile. Inside the container or if you are using the Docker image as a base image you have to use `adduser` for it. ```bash -docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v1.63.0-noble /bin/bash +docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v1.64.0-noble /bin/bash ``` [`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions: @@ -82,7 +82,7 @@ You can run Playwright Server in Docker while keeping your tests running on the Start the Playwright Server in Docker: ```bash -docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.63.0-noble /bin/sh -c "npx -y playwright@1.63.0 run-server --port 3000 --host 0.0.0.0" +docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.64.0-noble /bin/sh -c "npx -y playwright@1.64.0 run-server --port 3000 --host 0.0.0.0" ``` #### Connecting to the Server @@ -107,7 +107,7 @@ public class App { If you need to access local servers from within the Docker container: ```bash -docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.63.0-noble /bin/sh -c "npx -y playwright@1.63.0 run-server --port 3000 --host 0.0.0.0" +docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.64.0-noble /bin/sh -c "npx -y playwright@1.64.0 run-server --port 3000 --host 0.0.0.0" ``` This makes `hostmachine` point to the host's localhost. Your tests should use `hostmachine` instead of `localhost` when accessing local servers. @@ -123,7 +123,7 @@ For Docker and GitHub Codespaces environments, you can view and generate tests u ```json { - "image": "mcr.microsoft.com/playwright:v1.57.0", + "image": "mcr.microsoft.com/playwright:v1.64.0-noble", "forwardPorts": [6080], "features": { "desktop-lite": { @@ -140,10 +140,10 @@ Once this is enabled you can open the port specified in a new browser tab and yo See [all available image tags]. We currently publish images with the following tags: -- `:v1.63.0` - Playwright v1.63.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.63.0-noble` - Playwright v1.63.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.63.0-jammy` - Playwright v1.63.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish). -- `:v1.63.0-resolute` - Playwright v1.63.0 release docker image based on Ubuntu 26.04 LTS (Resolute Raccoon). +- `:v1.64.0` - Playwright v1.64.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). +- `:v1.64.0-noble` - Playwright v1.64.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). +- `:v1.64.0-jammy` - Playwright v1.64.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish). +- `:v1.64.0-resolute` - Playwright v1.64.0 release docker image based on Ubuntu 26.04 LTS (Resolute Raccoon). :::note @@ -219,6 +219,7 @@ Browser builds for Firefox and WebKit are built for the [glibc](https://en.wikip [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -226,6 +227,7 @@ Browser builds for Firefox and WebKit are built for the [glibc](https://en.wikip [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/downloads.mdx b/java/docs/downloads.mdx index a273279ced..42104b02c4 100644 --- a/java/docs/downloads.mdx +++ b/java/docs/downloads.mdx @@ -103,6 +103,7 @@ For uploading files, see the [uploading files](./input.mdx#upload-files) section [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -110,6 +111,7 @@ For uploading files, see the [uploading files](./input.mdx#upload-files) section [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/emulation.mdx b/java/docs/emulation.mdx index 6d00ac7aca..6ddafc0e6d 100644 --- a/java/docs/emulation.mdx +++ b/java/docs/emulation.mdx @@ -121,6 +121,22 @@ page.emulateMedia(new Page.EmulateMediaOptions().setMedia(Media.PRINT)); playwright web in dark mode +The `"reducedMotion"`, `"forcedColors"` and `"contrast"` options emulate the `prefers-reduced-motion`, `forced-colors` and `prefers-contrast` media features the same way. Supported values are `'reduce'` and `'no-preference'` for reduced motion, `'active'` and `'none'` for forced colors, and `'more'` and `'no-preference'` for contrast. [Page.emulateMedia()](/api/class-page.mdx#page-emulate-media) changes them for a single page. + +```java +// Create context with reduced motion, forced colors and more contrast +BrowserContext context = browser.newContext(new Browser.NewContextOptions() + .setReducedMotion(ReducedMotion.REDUCE) // or NO_PREFERENCE + .setForcedColors(ForcedColors.ACTIVE) // or NONE + .setContrast(Contrast.MORE)); // or NO_PREFERENCE + +// Change the media features for the page +page.emulateMedia(new Page.EmulateMediaOptions() + .setReducedMotion(ReducedMotion.REDUCE) + .setForcedColors(ForcedColors.ACTIVE) + .setContrast(Contrast.MORE)); +``` + ## User Agent The User Agent is included in the device and therefore you will rarely need to change it however if you do need to test a different user agent you can override it with the `userAgent` property. @@ -210,6 +226,7 @@ BrowserContext context = browser.newContext(new Browser.NewContextOptions() [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -217,6 +234,7 @@ BrowserContext context = browser.newContext(new Browser.NewContextOptions() [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/evaluating.mdx b/java/docs/evaluating.mdx index 1ee1c5f769..ad6206a04e 100644 --- a/java/docs/evaluating.mdx +++ b/java/docs/evaluating.mdx @@ -182,6 +182,7 @@ page.addInitScript(Paths.get("mocks/preload.js")); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -189,6 +190,7 @@ page.addInitScript(Paths.get("mocks/preload.js")); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/events.mdx b/java/docs/events.mdx index 3fb121e794..4a5bace79e 100644 --- a/java/docs/events.mdx +++ b/java/docs/events.mdx @@ -118,6 +118,7 @@ page.evaluate("prompt('Enter a number:')"); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -125,6 +126,7 @@ page.evaluate("prompt('Enter a number:')"); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/extensibility.mdx b/java/docs/extensibility.mdx index 88152e5039..ce66c49368 100644 --- a/java/docs/extensibility.mdx +++ b/java/docs/extensibility.mdx @@ -106,6 +106,7 @@ int buttonCount = (int) page.locator("tag=button").count(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -113,6 +114,7 @@ int buttonCount = (int) page.locator("tag=button").count(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/frames.mdx b/java/docs/frames.mdx index 319aa4f2e8..9874a98260 100644 --- a/java/docs/frames.mdx +++ b/java/docs/frames.mdx @@ -91,6 +91,7 @@ frame.fill("#username-input", "John"); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -98,6 +99,7 @@ frame.fill("#username-input", "John"); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/getting-started-cli.mdx b/java/docs/getting-started-cli.mdx index 082ca29b95..7f59e827aa 100644 --- a/java/docs/getting-started-cli.mdx +++ b/java/docs/getting-started-cli.mdx @@ -387,6 +387,7 @@ This requires the [Playwright Extension](https://github.com/microsoft/playwright [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -394,6 +395,7 @@ This requires the [Playwright Extension](https://github.com/microsoft/playwright [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/getting-started-mcp.mdx b/java/docs/getting-started-mcp.mdx index f67b34299a..987d1212a1 100644 --- a/java/docs/getting-started-mcp.mdx +++ b/java/docs/getting-started-mcp.mdx @@ -201,7 +201,7 @@ A page that keeps animating or rendering costs CPU for as long as the browser is ``` When no tool call has completed for that long, the browser is closed, headed or not, the same way as if you had closed it by hand. The next tool call launches a new browser, so the agent navigates again. The timer never fires while a tool call is running. -- With `--isolated`, cookies and storage kept in memory are lost on an idle close. Use the persistent profile or `--storage-state` to keep them. +- With `--isolated`, cookies and storage kept in memory are lost on an idle close. Use the persistent profile or `--storage-state` to keep them. Each client has its own timer: the context of an idle client is closed while other clients keep working, and the browser is closed once no client has a context. - With `--cdp-endpoint` or `--extension`, the browser is not owned by the server, so there is no default timeout, and an explicit one only disconnects from it, leaving its pages open. With `--extension`, the next tool call goes through the connect flow again. - With `--shared-browser-context`, the timer spans all clients: a client that is idle while others keep working keeps its tabs and state, and the shared browser is closed only once every client has been idle for the timeout. @@ -314,6 +314,7 @@ Then point your MCP client to the HTTP endpoint: [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -321,6 +322,7 @@ Then point your MCP client to the HTTP endpoint: [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/handles.mdx b/java/docs/handles.mdx index 18bf16b31c..cab9589ad2 100644 --- a/java/docs/handles.mdx +++ b/java/docs/handles.mdx @@ -174,6 +174,7 @@ locator.click(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -181,6 +182,7 @@ locator.click(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/input.mdx b/java/docs/input.mdx index 4d2e1b2010..dea23dff08 100644 --- a/java/docs/input.mdx +++ b/java/docs/input.mdx @@ -315,6 +315,7 @@ page.getByTestId("scrolling-container").evaluate("e => e.scrollTop += 100"); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -322,6 +323,7 @@ page.getByTestId("scrolling-container").evaluate("e => e.scrollTop += 100"); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/intro.mdx b/java/docs/intro.mdx index 65203ea86f..fabf6c78bc 100644 --- a/java/docs/intro.mdx +++ b/java/docs/intro.mdx @@ -58,7 +58,7 @@ public class App { com.microsoft.playwright playwright - 1.63.0 + 1.64.0 @@ -196,6 +196,7 @@ By default browsers launched with Playwright run headless, meaning no browser UI [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -203,6 +204,7 @@ By default browsers launched with Playwright run headless, meaning no browser UI [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/junit.mdx b/java/docs/junit.mdx index 44201d4c99..b6e63a1c7b 100644 --- a/java/docs/junit.mdx +++ b/java/docs/junit.mdx @@ -232,6 +232,7 @@ junit.jupiter.execution.parallel.config.dynamic.factor=0.5 [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -239,6 +240,7 @@ junit.jupiter.execution.parallel.config.dynamic.factor=0.5 [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/languages.mdx b/java/docs/languages.mdx index bbfabd566d..2e94853755 100644 --- a/java/docs/languages.mdx +++ b/java/docs/languages.mdx @@ -92,6 +92,7 @@ Playwright for .NET comes with MSTest, NUnit, xUnit, and xUnit v3 [base classes] [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -99,6 +100,7 @@ Playwright for .NET comes with MSTest, NUnit, xUnit, and xUnit v3 [base classes] [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/locators.mdx b/java/docs/locators.mdx index f8f5276e80..cc2e70e3f7 100644 --- a/java/docs/locators.mdx +++ b/java/docs/locators.mdx @@ -997,6 +997,7 @@ For less commonly used locators, look at the [other locators](./other-locators.m [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -1004,6 +1005,7 @@ For less commonly used locators, look at the [other locators](./other-locators.m [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/mock.mdx b/java/docs/mock.mdx index 605c4c1068..bf1d052ff6 100644 --- a/java/docs/mock.mdx +++ b/java/docs/mock.mdx @@ -250,6 +250,7 @@ For more details, see [WebSocketRoute]. [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -257,6 +258,7 @@ For more details, see [WebSocketRoute]. [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/navigations.mdx b/java/docs/navigations.mdx index b68ea4f923..052799988a 100644 --- a/java/docs/navigations.mdx +++ b/java/docs/navigations.mdx @@ -26,6 +26,10 @@ The code above loads the page and waits for the web page to fire the [load](http If the page does a client-side redirect before `load`, [Page.navigate()](/api/class-page.mdx#page-goto) will wait for the redirected page to fire the `load` event. ::: +:::note +In Firefox, a navigation triggered by the page can interrupt [Page.navigate()](/api/class-page.mdx#page-goto) with an `NS_BINDING_ABORTED` error. This is a [known Firefox limitation](https://github.com/microsoft/playwright/issues/20749). +::: + ## When is the page loaded? Modern pages perform numerous activities after the `load` event was fired. They fetch data lazily, populate UI, load expensive resources, scripts and styles after the `load` event was fired. There is no way to tell that the page is `loaded`, it depends on the page, framework, etc. So when can you start interacting with it? @@ -144,6 +148,7 @@ Playwright splits the process of showing a new document in a page into **navigat [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -151,6 +156,7 @@ Playwright splits the process of showing a new document in a page into **navigat [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/network.mdx b/java/docs/network.mdx index d55a7c9a0c..7eb67c8949 100644 --- a/java/docs/network.mdx +++ b/java/docs/network.mdx @@ -311,6 +311,7 @@ It might be that you are using a mock tool such as Mock Service Worker (MSW). Wh [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -318,6 +319,7 @@ It might be that you are using a mock tool such as Mock Service Worker (MSW). Wh [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/other-locators.mdx b/java/docs/other-locators.mdx index ea59f411d3..0d85f0c913 100644 --- a/java/docs/other-locators.mdx +++ b/java/docs/other-locators.mdx @@ -465,6 +465,7 @@ For example, `css=article >> text=Hello` captures the element with the text `Hel [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -472,6 +473,7 @@ For example, `css=article >> text=Hello` captures the element with the text `Hel [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/pages.mdx b/java/docs/pages.mdx index 06ac6fe356..7cace365e7 100644 --- a/java/docs/pages.mdx +++ b/java/docs/pages.mdx @@ -148,6 +148,7 @@ page.onPopup(popup -> { [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -155,6 +156,7 @@ page.onPopup(popup -> { [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/pom.mdx b/java/docs/pom.mdx index e7a3900301..beb4290ef4 100644 --- a/java/docs/pom.mdx +++ b/java/docs/pom.mdx @@ -115,6 +115,7 @@ searchPage.search("search query"); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -122,6 +123,7 @@ searchPage.search("search query"); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/release-notes.mdx b/java/docs/release-notes.mdx index 688fce3cc1..7606c87474 100644 --- a/java/docs/release-notes.mdx +++ b/java/docs/release-notes.mdx @@ -9,6 +9,100 @@ import HTMLCard from '@site/src/components/HTMLCard'; import LiteYouTube from '@site/src/components/LiteYouTube'; +## Version 1.64 + +### 🧰 WebMCP + +New [Page.webmcp()](/api/class-page.mdx#page-webmcp) and [Frame.webmcp()](/api/class-frame.mdx#frame-webmcp) give access to the tools that a page registers through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) browser API, so you can test them like any other part of your app: + +```java +Browser browser = chromium.launch(new BrowserType.LaunchOptions() + .setArgs(Arrays.asList("--enable-features=WebMCP"))); +Page page = browser.newPage(); +page.navigate("https://example.com"); + +for (WebMCPTool tool : page.webmcp().tools()) + System.out.println(tool.name + ": " + tool.description); + +Object result = page.webmcp().callTool("add", Map.of("a", 2, "b", 40)); +System.out.println(result); // {content=[{type=text, text=42}]} +``` + +[Playwright MCP](./getting-started-mcp.mdx) also supports WebMCP by default, with page-defined tools offered to the agent as `webmcp_`. Pass `--no-webmcp` to opt out. + +[`playwright-cli`](./getting-started-cli.mdx) exposes them as well: + +```bash +playwright-cli webmcp-list +playwright-cli webmcp-call search_catalog --params '{"query":"cats"}' +``` + +### 🎬 Better videos + +Videos can now be recorded at a custom frame rate, and the decorations for actions are styled with plain CSS: + +```java +page.screencast().start(new Screencast.StartOptions() + .setPath(Paths.get("video.webm")) + .setSize(1920, 1080) + .setFps(60)); +page.screencast().showActions(new Screencast.ShowActionsOptions() + .setStyle(new ScreencastActionStyle() + .setPoint("width: 20px; height: 20px; border-radius: 50%; background: red") + .setHighlight("outline: 2px solid #333; background: rgba(0, 128, 255, .15)") + .setTitle("font-size: 16px"))); +``` + +- New [setRecordVideoFps](/api/class-browser.mdx#browser-new-context-option-record-video-fps) option and new [setFps](/api/class-screencast.mdx#screencast-start-option-fps) option in [Screencast.start()](/api/class-screencast.mdx#screencast-start). Firefox and WebKit currently capture up to 25 frames per second. +- New [setStyle](/api/class-screencast.mdx#screencast-show-actions-option-style) option takes CSS declarations for the `point` marker, the target `highlight` and the action `title`. It replaces the `fontSize` option, which is now deprecated. +- The cursor stays visible at the last action point, survives navigations and travels along a natural, eased path. +- Videos are encoded with VP9 instead of VP8, which takes less CPU and produces smaller files of the same or better quality. +- All video options are also available in [Playwright MCP](./getting-started-mcp.mdx) and [`playwright-cli`](./getting-started-cli.mdx). + +### 🪆 Locator.within() + +New [Locator.within()](/api/class-locator.mdx#locator-within) combines two locators that you already have, reading in the natural order — "this button, within that dialog": + +```java +Locator saveButton = page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Save")); +Locator dialog = page.getByTestId("settings-dialog"); + +saveButton.within(dialog).click(); +``` + +Relative locators such as [Locator.nth()](/api/class-locator.mdx#locator-nth) or [Locator.first()](/api/class-locator.mdx#locator-first) are resolved inside each parent separately, which makes column-like queries straightforward: + +```java +// The third cell of every row, not the third cell in the table. +Locator thirdColumn = page.getByRole(AriaRole.CELL).nth(2).within(page.getByRole(AriaRole.ROW)); +assertThat(thirdColumn).hasText(new String[] {"Apple", "Banana", "Cherry"}); +``` + +### New APIs +- New [Page.getByRef()](/api/class-page.mdx#page-get-by-ref) locates an element by its aria ref, such as `e2`, reported by [Page.ariaSnapshot()](/api/class-page.mdx#page-aria-snapshot) in the `"ai"` mode. +- New option [setIncludeShadow](/api/class-page.mdx#page-content-option-include-shadow) in [Page.content()](/api/class-page.mdx#page-content) and [Frame.content()](/api/class-frame.mdx#frame-content) serializes open shadow roots as [declarative shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#declaratively_with_html). +- New option [setSignCount](/api/class-credentials.mdx#credentials-create-option-sign-count) sets the initial signature counter of a virtual credential. [Credentials.create()](/api/class-credentials.mdx#credentials-create) and [Credentials.get()](/api/class-credentials.mdx#credentials-get) return the current `signCount`, and it is saved and restored together with the credentials in the storage state. +- New [APIRequestContext.addCookies()](/api/class-apirequestcontext.mdx#api-request-context-add-cookies), [APIRequestContext.cookies()](/api/class-apirequestcontext.mdx#api-request-context-cookies) and [APIRequestContext.clearCookies()](/api/class-apirequestcontext.mdx#api-request-context-clear-cookies) manage cookies of a request context, mirroring the [BrowserContext] methods: + + ```java + request.addCookies(Arrays.asList( + new Cookie("session-id", "42").setUrl("https://example.com"))); + System.out.println(request.cookies("https://example.com")); + request.clearCookies(new APIRequestContext.ClearCookiesOptions().setName("session-id")); + ``` + +### Breaking Changes ⚠️ +- Elements inside hidden iframes are considered hidden. Elements inside an iframe that is not visible, for example with `visibility: hidden`, are now considered hidden by actions, [Locator.isVisible()](/api/class-locator.mdx#locator-is-visible) and [assertThat(locator).isVisible()](/api/class-locatorassertions.mdx#locator-assertions-to-be-visible). + +### Browser Versions +- Chromium 156.0.8078.4 +- Mozilla Firefox 157.0 +- WebKit 27.2 + +This version was also tested against the following stable channels: +- Google Chrome 155 +- Microsoft Edge 155 + ## Version 1.63 ### 🪟 Locate across frames @@ -2215,6 +2309,7 @@ This version of Playwright was also tested against the following stable channels [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -2222,6 +2317,7 @@ This version of Playwright was also tested against the following stable channels [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/running-tests.mdx b/java/docs/running-tests.mdx index 78638625d2..bfffdc8c22 100644 --- a/java/docs/running-tests.mdx +++ b/java/docs/running-tests.mdx @@ -153,6 +153,7 @@ If you prefer, you can run your tests in headed mode by using the `launch(new Br [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -160,6 +161,7 @@ If you prefer, you can run your tests in headed mode by using the `launch(new Br [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/screenshots.mdx b/java/docs/screenshots.mdx index 749df6a1d7..a1afe15adc 100644 --- a/java/docs/screenshots.mdx +++ b/java/docs/screenshots.mdx @@ -102,6 +102,7 @@ page.locator(".header").screenshot(new Locator.ScreenshotOptions().setPath(Paths [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -109,6 +110,7 @@ page.locator(".header").screenshot(new Locator.ScreenshotOptions().setPath(Paths [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/selenium-grid.mdx b/java/docs/selenium-grid.mdx index 132429d91a..3395e97002 100644 --- a/java/docs/selenium-grid.mdx +++ b/java/docs/selenium-grid.mdx @@ -181,6 +181,7 @@ This means that Selenium 3 is supported in a best-effort manner, where Playwrigh [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -188,6 +189,7 @@ This means that Selenium 3 is supported in a best-effort manner, where Playwrigh [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/test-assertions.mdx b/java/docs/test-assertions.mdx index 5fc5003208..16e1dd313e 100644 --- a/java/docs/test-assertions.mdx +++ b/java/docs/test-assertions.mdx @@ -134,6 +134,7 @@ assertThat(page.getByText("Name")).isVisible( [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -141,6 +142,7 @@ assertThat(page.getByText("Name")).isVisible( [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/test-runners.mdx b/java/docs/test-runners.mdx index d23bbbe733..f7d3e11fb2 100644 --- a/java/docs/test-runners.mdx +++ b/java/docs/test-runners.mdx @@ -198,7 +198,7 @@ repositories { } dependencies { - implementation 'com.microsoft.playwright:playwright:1.63.0' + implementation 'com.microsoft.playwright:playwright:1.64.0' } application { @@ -231,7 +231,7 @@ repositories { } dependencies { - implementation("com.microsoft.playwright:playwright:1.63.0") + implementation("com.microsoft.playwright:playwright:1.64.0") } application { @@ -398,6 +398,7 @@ public class TestExample { [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -405,6 +406,7 @@ public class TestExample { [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/threading.mdx b/java/docs/threading.mdx index 06525ed576..5e75b93039 100644 --- a/java/docs/threading.mdx +++ b/java/docs/threading.mdx @@ -138,6 +138,7 @@ page.waitForTimeout(60_000); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -145,6 +146,7 @@ page.waitForTimeout(60_000); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/touch-events.mdx b/java/docs/touch-events.mdx index 08ed52738c..f584060067 100644 --- a/java/docs/touch-events.mdx +++ b/java/docs/touch-events.mdx @@ -208,6 +208,7 @@ public class TouchEvents { [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -215,6 +216,7 @@ public class TouchEvents { [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/trace-viewer-intro.mdx b/java/docs/trace-viewer-intro.mdx index 518b9d1dad..2a3649ea4d 100644 --- a/java/docs/trace-viewer-intro.mdx +++ b/java/docs/trace-viewer-intro.mdx @@ -113,6 +113,7 @@ To learn more check out our detailed guide on [Trace Viewer](/trace-viewer.mdx). [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -120,6 +121,7 @@ To learn more check out our detailed guide on [Trace Viewer](/trace-viewer.mdx). [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/trace-viewer.mdx b/java/docs/trace-viewer.mdx index 64fa1091cf..e59653a61b 100644 --- a/java/docs/trace-viewer.mdx +++ b/java/docs/trace-viewer.mdx @@ -211,6 +211,7 @@ Next to the Actions tab you will find the Metadata tab which will show you more [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -218,6 +219,7 @@ Next to the Actions tab you will find the Metadata tab which will show you more [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/videos.mdx b/java/docs/videos.mdx index 4e9629cd2c..f76ab289db 100644 --- a/java/docs/videos.mdx +++ b/java/docs/videos.mdx @@ -96,6 +96,7 @@ Note that the video is only available after the page or browser context is close [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -103,6 +104,7 @@ Note that the video is only available after the page or browser context is close [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/webview2.mdx b/java/docs/webview2.mdx index 431446e77c..f134b2e95a 100644 --- a/java/docs/webview2.mdx +++ b/java/docs/webview2.mdx @@ -232,6 +232,7 @@ For debugging tests, see the Playwright [Debugging guide](./debug). [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -239,6 +240,7 @@ For debugging tests, see the Playwright [Debugging guide](./debug). [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/java/docs/writing-tests.mdx b/java/docs/writing-tests.mdx index 473fc336c5..93d426392e 100644 --- a/java/docs/writing-tests.mdx +++ b/java/docs/writing-tests.mdx @@ -153,6 +153,7 @@ Page page = context.newPage(); [UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" [xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" +[BiConsumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html "BiConsumer" [boolean]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "boolean" [byte[]]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "byte[]" [Consumer]: https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html "Consumer" @@ -160,6 +161,7 @@ Page page = context.newPage(); [double]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "double" [InputStream]: https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html "InputStream" [int]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "int" +[Integer]: https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html "Integer" [long]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html "long" [JsonObject]: https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html "JsonObject" [List]: https://docs.oracle.com/javase/8/docs/api/java/util/List.html "List" diff --git a/nodejs/docs/api/class-browsercontext.mdx b/nodejs/docs/api/class-browsercontext.mdx index 1e5f8fbbfb..37d8a3d67f 100644 --- a/nodejs/docs/api/class-browsercontext.mdx +++ b/nodejs/docs/api/class-browsercontext.mdx @@ -663,13 +663,13 @@ Note that only `WebSocket`s created after this method was called will be routed. Below is an example of a simple handler that blocks some websocket messages. See [WebSocketRoute] for more details and examples. ```js -await context.routeWebSocket('/ws', async ws => { - ws.routeSend(message => { +await context.routeWebSocket('/ws', ws => { + const server = ws.connectToServer(); + ws.onMessage(message => { if (message === 'to-be-blocked') return; - ws.send(message); + server.send(message); }); - await ws.connect(); }); ``` diff --git a/nodejs/docs/api/class-cdpsession.mdx b/nodejs/docs/api/class-cdpsession.mdx index 56725aec84..7c8e88c0ad 100644 --- a/nodejs/docs/api/class-cdpsession.mdx +++ b/nodejs/docs/api/class-cdpsession.mdx @@ -56,7 +56,7 @@ await cdpSession.detach(); ```js await cdpSession.send(method); -await cdpSession.send(method, params); +await cdpSession.send(method, params, options); ``` **Arguments** @@ -66,6 +66,13 @@ await cdpSession.send(method, params); - `params` [Object] *(optional)*# Optional method parameters. +- `options` [Object] *(optional)* + - `signal` [AbortSignal] *(optional)* Added in: v1.65# + + Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. + - `timeout` [number] *(optional)* Added in: v1.65# + + Maximum time in milliseconds to wait for the response. Defaults to `0` - no timeout. **Returns** - [Promise]<[Object]># diff --git a/nodejs/docs/api/class-clock.mdx b/nodejs/docs/api/class-clock.mdx index 575f0df349..1b33bdd62e 100644 --- a/nodejs/docs/api/class-clock.mdx +++ b/nodejs/docs/api/class-clock.mdx @@ -32,7 +32,7 @@ await page.clock.fastForward('30:00'); **Arguments** - `ticks` [number] | [string]# - Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. + Time may be a finite number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. **Returns** - [Promise]<[void]># @@ -144,7 +144,7 @@ await page.clock.runFor('30:00'); **Arguments** - `ticks` [number] | [string]# - Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. + Time may be a finite number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. **Returns** - [Promise]<[void]># diff --git a/nodejs/docs/api/class-frame.mdx b/nodejs/docs/api/class-frame.mdx index 99c6917d9b..cc4be9c24e 100644 --- a/nodejs/docs/api/class-frame.mdx +++ b/nodejs/docs/api/class-frame.mdx @@ -2245,7 +2245,7 @@ frame.selectOption('select#colors', 'blue'); frame.selectOption('select#colors', { label: 'Blue' }); // multiple selection -frame.selectOption('select#colors', 'red', 'green', 'blue'); +frame.selectOption('select#colors', ['red', 'green', 'blue']); ``` **Arguments** diff --git a/nodejs/docs/api/class-page.mdx b/nodejs/docs/api/class-page.mdx index 46aa67ce78..4b4b2d62cd 100644 --- a/nodejs/docs/api/class-page.mdx +++ b/nodejs/docs/api/class-page.mdx @@ -2555,7 +2555,7 @@ const request = await requestPromise; **Arguments** - `urlOrPredicate` [string] | [RegExp] | [function]\([Request]\):[boolean] | [Promise]<[boolean]># - Request URL string, regex or predicate receiving [Request] object. + Request URL string, regex or predicate receiving [Request] object. When a [baseURL](/api/class-browser.mdx#browser-new-context-option-base-url) via the context options was provided and the passed URL is a path, it gets merged via the [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. - `options` [Object] *(optional)* - `signal` [AbortSignal] *(optional)* Added in: v1.62# @@ -2787,10 +2787,11 @@ page.request **Usage** ```js -page.screencast.on('screencastFrame', data => { - console.log('received frame, jpeg size:', data.length); +await page.screencast.start({ + onFrame: ({ data }) => { + console.log('received frame, jpeg size:', data.length); + }, }); -await page.screencast.start(); // ... perform actions ... await page.screencast.stop(); ``` diff --git a/nodejs/docs/api/class-test.mdx b/nodejs/docs/api/class-test.mdx index a2f3dc82fb..bf42e70185 100644 --- a/nodejs/docs/api/class-test.mdx +++ b/nodejs/docs/api/class-test.mdx @@ -110,6 +110,8 @@ test('update user settings', { }); ``` +The built-in `exclusive` lock runs the test only when no other tests are running. + Learn more about [test locks](../test-parallel.mdx#test-locks). **Arguments** diff --git a/nodejs/docs/api/class-testconfig.mdx b/nodejs/docs/api/class-testconfig.mdx index 8d26f1e5ba..06215ad7f1 100644 --- a/nodejs/docs/api/class-testconfig.mdx +++ b/nodejs/docs/api/class-testconfig.mdx @@ -1123,7 +1123,7 @@ export default defineConfig({ ```js import { test, expect } from '@playwright/test'; -test.use({ baseUrl: `http://localhost:${process.env.MY_SERVER_PORT ?? 3000}` }); +test.use({ baseURL: `http://localhost:${process.env.MY_SERVER_PORT ?? 3000}` }); test('homepage', async ({ page }) => { await page.goto('/'); diff --git a/nodejs/docs/api/class-testoptions.mdx b/nodejs/docs/api/class-testoptions.mdx index 478dbc4e27..efc6d098a3 100644 --- a/nodejs/docs/api/class-testoptions.mdx +++ b/nodejs/docs/api/class-testoptions.mdx @@ -1117,6 +1117,15 @@ Learn more about [recording trace](../test-use-options.mdx#recording-options). - `sources` [boolean] *(optional)* Whether to include source files for trace actions. Defaults to true. Optional. + - `secrets` [Array]<[Object]> *(optional)* + - `name` [string] *(optional)* + + Name of the secret. The trace shows `NAME` in place of the value, or `` when the name is not set. Optional. + - `value` [string] + + Sensitive text to hide. + + Sensitive values to hide in the trace. Optional. --- diff --git a/nodejs/docs/api/class-testrun.mdx b/nodejs/docs/api/class-testrun.mdx index 07458bcf93..637be1635b 100644 --- a/nodejs/docs/api/class-testrun.mdx +++ b/nodejs/docs/api/class-testrun.mdx @@ -7,7 +7,7 @@ import TabItem from '@theme/TabItem'; import HTMLCard from '@site/src/components/HTMLCard'; -Controls which tests will run and their expected status. A [TestRun] is available during [reporter.preprocess()](/api/class-reporter.mdx#reporter-preprocess). Setup and teardown projects cannot be changed. +Controls which tests will run and their expected status, and provides information about suite execution modes. A [TestRun] is available during [reporter.preprocess()](/api/class-reporter.mdx#reporter-preprocess). Setup and teardown projects cannot be changed. --- @@ -79,6 +79,32 @@ testRun.fixme(test, reason); --- +### mode {/* #test-run-mode */} + +Added in: v1.65testRun.mode + +Returns the execution mode configured for a suite with [test.describe.configure()](/api/class-test.mdx#test-describe-configure), [test.describe.serial()](/api/class-test.mdx#test-describe-serial) or [test.describe.parallel()](/api/class-test.mdx#test-describe-parallel). If the suite does not configure a mode, it inherits its parent's mode. Project suites use `"parallel"` when [testProject.fullyParallel](/api/class-testproject.mdx#test-project-fully-parallel) is enabled, and `"default"` otherwise. The root suite uses `"default"`. + +An explicit `"default"` suite does not inherit `"parallel"` from its parent: its tests run in order in the same worker. The mode alone does not describe complete test groups, which also depend on worker fixtures and hooks. + +This method can only be called during [reporter.preprocess()](/api/class-reporter.mdx#reporter-preprocess), and can also inspect setup and teardown projects. + +**Usage** + +```js +testRun.mode(suite); +``` + +**Arguments** +- `suite` [Suite]# + + Suite to inspect. + +**Returns** +- "serial" | "parallel" | "default"# + +--- + ### skip {/* #test-run-skip */} Added in: v1.62testRun.skip diff --git a/nodejs/docs/api/class-websocketroute.mdx b/nodejs/docs/api/class-websocketroute.mdx index 61b4b0d0ff..1304186562 100644 --- a/nodejs/docs/api/class-websocketroute.mdx +++ b/nodejs/docs/api/class-websocketroute.mdx @@ -146,7 +146,7 @@ webSocketRoute.onClose(handler); ``` **Arguments** -- `handler` [function]\([number] | [undefined]\):[Promise]<[Object]> | [Object]# +- `handler` [function]\([number] | [undefined], [string] | [undefined]\):[Promise]<[Object]> | [Object]# Function that will handle WebSocket closure. Received an optional [close code](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code) and an optional [close reason](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#reason). @@ -171,7 +171,7 @@ webSocketRoute.onMessage(handler); ``` **Arguments** -- `handler` [function]\([string]\):[Promise]<[Object]> | [Object]# +- `handler` [function]\([string] | [Buffer]\):[Promise]<[Object]> | [Object]# Function that will handle messages. diff --git a/nodejs/docs/ci-intro.mdx b/nodejs/docs/ci-intro.mdx index 42138e42fc..544e141244 100644 --- a/nodejs/docs/ci-intro.mdx +++ b/nodejs/docs/ci-intro.mdx @@ -42,7 +42,7 @@ jobs: run: npx playwright install --with-deps - name: Run Playwright tests run: npx playwright test - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v5 if: ${{ !cancelled() }} with: name: playwright-report diff --git a/nodejs/docs/ci.mdx b/nodejs/docs/ci.mdx index cc411ec7c3..1eaa867417 100644 --- a/nodejs/docs/ci.mdx +++ b/nodejs/docs/ci.mdx @@ -117,7 +117,7 @@ jobs: name: 'Playwright Tests' runs-on: ubuntu-latest container: - image: mcr.microsoft.com/playwright:v1.64.0-noble + image: mcr.microsoft.com/playwright:v1.64.1-noble options: --user 1001 steps: - uses: actions/checkout@v6 @@ -349,7 +349,7 @@ trigger: pool: vmImage: ubuntu-latest -container: mcr.microsoft.com/playwright:v1.64.0-noble +container: mcr.microsoft.com/playwright:v1.64.1-noble steps: - task: UseNode@1 @@ -373,7 +373,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In executors: pw-noble-development: docker: - - image: mcr.microsoft.com/playwright:v1.64.0-noble + - image: mcr.microsoft.com/playwright:v1.64.1-noble ``` Note: When using the docker agent definition, you are specifying the resource class of where playwright runs to the 'medium' tier [here](https://circleci.com/docs/configuration-reference?#docker-execution-environment). The default behavior of Playwright is to set the number of workers to the detected core count (2 in the case of the medium tier). Overriding the number of workers to greater than this number will cause unnecessary timeouts and failures. @@ -396,7 +396,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image]( ```groovy pipeline { - agent { docker { image 'mcr.microsoft.com/playwright:v1.64.0-noble' } } + agent { docker { image 'mcr.microsoft.com/playwright:v1.64.1-noble' } } stages { stage('e2e-tests') { steps { @@ -413,7 +413,7 @@ pipeline { Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](./docker.mdx)). ```yml -image: mcr.microsoft.com/playwright:v1.64.0-noble +image: mcr.microsoft.com/playwright:v1.64.1-noble ``` ### GitLab CI @@ -426,7 +426,7 @@ stages: tests: stage: test - image: mcr.microsoft.com/playwright:v1.64.0-noble + image: mcr.microsoft.com/playwright:v1.64.1-noble script: ... ``` @@ -441,7 +441,7 @@ stages: tests: stage: test - image: mcr.microsoft.com/playwright:v1.64.0-noble + image: mcr.microsoft.com/playwright:v1.64.1-noble parallel: 7 script: - npm ci @@ -456,7 +456,7 @@ stages: tests: stage: test - image: mcr.microsoft.com/playwright:v1.64.0-noble + image: mcr.microsoft.com/playwright:v1.64.1-noble parallel: matrix: - PROJECT: ['chromium', 'webkit'] @@ -472,7 +472,7 @@ To run Playwright tests on Google Cloud Build, use our public Docker image ([see ```yml steps: -- name: mcr.microsoft.com/playwright:v1.64.0-noble +- name: mcr.microsoft.com/playwright:v1.64.1-noble script: ... env: @@ -490,7 +490,7 @@ type: docker steps: - name: test - image: mcr.microsoft.com/playwright:v1.64.0-noble + image: mcr.microsoft.com/playwright:v1.64.1-noble commands: - npx playwright test ``` diff --git a/nodejs/docs/docker.mdx b/nodejs/docs/docker.mdx index 1002a7a2a7..34ce987da1 100644 --- a/nodejs/docs/docker.mdx +++ b/nodejs/docs/docker.mdx @@ -22,7 +22,7 @@ This Docker image is intended to be used for testing and development purposes on ### Pull the image ```bash -docker pull mcr.microsoft.com/playwright:v1.64.0-noble +docker pull mcr.microsoft.com/playwright:v1.64.1-noble ``` ### Run the image @@ -34,7 +34,7 @@ By default, the Docker image will use the `root` user to run the browsers. This On trusted websites, you can avoid creating a separate user and use root for it since you trust the code which will run on the browsers. ```bash -docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v1.64.0-noble /bin/bash +docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v1.64.1-noble /bin/bash ``` #### Crawling and scraping @@ -42,7 +42,7 @@ docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v1.64.0-noble /bin/b On untrusted websites, it's recommended to use a separate user for launching the browsers in combination with the seccomp profile. Inside the container or if you are using the Docker image as a base image you have to use `adduser` for it. ```bash -docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright:v1.64.0-noble /bin/bash +docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright:v1.64.1-noble /bin/bash ``` [`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions: @@ -82,7 +82,7 @@ You can run Playwright Server in Docker while keeping your tests running on the Start the Playwright Server in Docker: ```bash -docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.64.0-noble /bin/sh -c "npx -y playwright@1.64.0 run-server --port 3000 --host 0.0.0.0" +docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.64.1-noble /bin/sh -c "npx -y playwright@1.64.1 run-server --port 3000 --host 0.0.0.0" ``` #### Connecting to the Server @@ -105,7 +105,7 @@ const browser = await playwright['chromium'].connect('ws://127.0.0.1:3000/'); If you need to access local servers from within the Docker container: ```bash -docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.64.0-noble /bin/sh -c "npx -y playwright@1.64.0 run-server --port 3000 --host 0.0.0.0" +docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.64.1-noble /bin/sh -c "npx -y playwright@1.64.1 run-server --port 3000 --host 0.0.0.0" ``` This makes `hostmachine` point to the host's localhost. Your tests should use `hostmachine` instead of `localhost` when accessing local servers. @@ -121,7 +121,7 @@ For Docker and GitHub Codespaces environments, you can view and generate tests u ```json { - "image": "mcr.microsoft.com/playwright:v1.57.0", + "image": "mcr.microsoft.com/playwright:v1.64.1-noble", "forwardPorts": [6080], "features": { "desktop-lite": { @@ -138,10 +138,10 @@ Once this is enabled you can open the port specified in a new browser tab and yo See [all available image tags]. We currently publish images with the following tags: -- `:v1.64.0` - Playwright v1.64.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.64.0-noble` - Playwright v1.64.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.64.0-jammy` - Playwright v1.64.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish). -- `:v1.64.0-resolute` - Playwright v1.64.0 release docker image based on Ubuntu 26.04 LTS (Resolute Raccoon). +- `:v1.64.1` - Playwright v1.64.1 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). +- `:v1.64.1-noble` - Playwright v1.64.1 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). +- `:v1.64.1-jammy` - Playwright v1.64.1 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish). +- `:v1.64.1-resolute` - Playwright v1.64.1 release docker image based on Ubuntu 26.04 LTS (Resolute Raccoon). :::note @@ -166,7 +166,7 @@ To run Playwright inside Docker, you need to have Node.js, [Playwright browsers] ```Dockerfile FROM node:20-bookworm -RUN npx -y playwright@1.64.0 install --with-deps +RUN npx -y playwright@1.64.1 install --with-deps ``` diff --git a/nodejs/docs/emulation.mdx b/nodejs/docs/emulation.mdx index 229e90330f..7f40097b0a 100644 --- a/nodejs/docs/emulation.mdx +++ b/nodejs/docs/emulation.mdx @@ -519,6 +519,62 @@ await page.emulateMedia({ media: 'print' }); playwright web in dark mode +The `"reducedMotion"`, `"forcedColors"` and `"contrast"` options emulate the `prefers-reduced-motion`, `forced-colors` and `prefers-contrast` media features the same way. Supported values are `'reduce'` and `'no-preference'` for reduced motion, `'active'` and `'none'` for forced colors, and `'more'` and `'no-preference'` for contrast. [page.emulateMedia()](/api/class-page.mdx#page-emulate-media) changes them for a single page. + +```js title="playwright.config.ts" +import { defineConfig } from '@playwright/test'; + +export default defineConfig({ + use: { + reducedMotion: 'reduce', + forcedColors: 'active', + contrast: 'more', + }, +}); +``` + + + + +```js title="tests/example.spec.ts" +import { test, expect } from '@playwright/test'; + +test.use({ + reducedMotion: 'reduce', // or 'no-preference' + forcedColors: 'active', // or 'none' + contrast: 'more', // or 'no-preference' +}); + +test('my test with reduced motion, forced colors and more contrast', async ({ page }) => { + // ... +}); +``` + + + + +```js +// Create context with reduced motion, forced colors and more contrast +const context = await browser.newContext({ + reducedMotion: 'reduce', // or 'no-preference' + forcedColors: 'active', // or 'none' + contrast: 'more', // or 'no-preference' +}); + +// Change the media features for the page +await page.emulateMedia({ reducedMotion: 'reduce', forcedColors: 'active', contrast: 'more' }); +``` + + + + ## User Agent The User Agent is included in the device and therefore you will rarely need to change it however if you do need to test a different user agent you can override it with the `userAgent` property. diff --git a/nodejs/docs/getting-started-mcp.mdx b/nodejs/docs/getting-started-mcp.mdx index dc3b5f0c0b..d164140b0a 100644 --- a/nodejs/docs/getting-started-mcp.mdx +++ b/nodejs/docs/getting-started-mcp.mdx @@ -201,7 +201,7 @@ A page that keeps animating or rendering costs CPU for as long as the browser is ``` When no tool call has completed for that long, the browser is closed, headed or not, the same way as if you had closed it by hand. The next tool call launches a new browser, so the agent navigates again. The timer never fires while a tool call is running. -- With `--isolated`, cookies and storage kept in memory are lost on an idle close. Use the persistent profile or `--storage-state` to keep them. +- With `--isolated`, cookies and storage kept in memory are lost on an idle close. Use the persistent profile or `--storage-state` to keep them. Each client has its own timer: the context of an idle client is closed while other clients keep working, and the browser is closed once no client has a context. - With `--cdp-endpoint` or `--extension`, the browser is not owned by the server, so there is no default timeout, and an explicit one only disconnects from it, leaving its pages open. With `--extension`, the next tool call goes through the connect flow again. - With `--shared-browser-context`, the timer spans all clients: a client that is idle while others keep working keeps its tabs and state, and the shared browser is closed only once every client has been idle for the timeout. diff --git a/nodejs/docs/navigations.mdx b/nodejs/docs/navigations.mdx index 04e4f618f4..40393e5757 100644 --- a/nodejs/docs/navigations.mdx +++ b/nodejs/docs/navigations.mdx @@ -26,6 +26,10 @@ The code above loads the page and waits for the web page to fire the [load](http If the page does a client-side redirect before `load`, [page.goto()](/api/class-page.mdx#page-goto) will wait for the redirected page to fire the `load` event. ::: +:::note +In Firefox, a navigation triggered by the page can interrupt [page.goto()](/api/class-page.mdx#page-goto) with an `NS_BINDING_ABORTED` error. This is a [known Firefox limitation](https://github.com/microsoft/playwright/issues/20749). +::: + ## When is the page loaded? Modern pages perform numerous activities after the `load` event was fired. They fetch data lazily, populate UI, load expensive resources, scripts and styles after the `load` event was fired. There is no way to tell that the page is `loaded`, it depends on the page, framework, etc. So when can you start interacting with it? diff --git a/nodejs/docs/test-assertions.mdx b/nodejs/docs/test-assertions.mdx index 3143546280..8a2556f865 100644 --- a/nodejs/docs/test-assertions.mdx +++ b/nodejs/docs/test-assertions.mdx @@ -339,6 +339,46 @@ test('amount', async () => { }); ``` +### Generic custom matchers + +TypeScript cannot carry a type parameter from the matcher implementation to the call site. If the matcher is generic over the received value, its type parameter becomes `unknown` when you call the matcher on `expect`. + +To get the type of the received value in the matcher arguments, declare the matcher signature in the `PlaywrightTest.Matchers` interface. Its second type parameter `T` is the type of the value passed to `expect`. Note that a generic matcher also needs an explicit `this` parameter type to access `this.utils` and other matcher state. + +```js title="fixtures.ts" +import { expect as baseExpect } from '@playwright/test'; +import type { ExpectMatcherState } from '@playwright/test'; + +export const expect = baseExpect.extend({ + toSatisfy(this: ExpectMatcherState, received: T, predicate: (value: T) => boolean) { + const pass = predicate(received); + return { + message: () => `expected ${this.utils.printReceived(received)} to satisfy the predicate`, + pass, + }; + }, +}); + +declare global { + namespace PlaywrightTest { + interface Matchers { + toSatisfy(predicate: (value: T) => boolean): R; + } + } +} +``` + +Now the `value` argument has the type of the received value. + +```js title="example.spec.ts" +import { test, expect } from './fixtures'; + +test('generic matcher', async () => { + expect('hello').toSatisfy(value => value.startsWith('h')); + expect(42).toSatisfy(value => value > 40); +}); +``` + ### Compatibility with expect library :::note diff --git a/nodejs/docs/test-cli.mdx b/nodejs/docs/test-cli.mdx index c7a4c72240..1ce5b252fc 100644 --- a/nodejs/docs/test-cli.mdx +++ b/nodejs/docs/test-cli.mdx @@ -301,6 +301,8 @@ npx playwright show-trace trace/ | `-h, --host ` | Host to serve trace on | | `-p, --port ` | Port to serve trace on | +When you pass `--port`, other users on your machine can open the trace on that port. When you pass `--host`, anyone who can reach this address and port can open the trace, for example other machines in your network with `--host=0.0.0.0`. + ## Specialized Commands ### Merge Reports @@ -338,6 +340,12 @@ Clear all Playwright caches. npx playwright clear-cache ``` +Playwright keeps transpiled test files in the system temporary directory. To keep them in another directory, for example on a Linux machine shared with other users, set the `PLAYWRIGHT_TRANSFORM_CACHE_DIR` environment variable: + +```bash +PLAYWRIGHT_TRANSFORM_CACHE_DIR=~/.cache/playwright-transform npx playwright test +``` + [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" diff --git a/nodejs/docs/test-parallel.mdx b/nodejs/docs/test-parallel.mdx index 9b9c8d3df6..c8256cca32 100644 --- a/nodejs/docs/test-parallel.mdx +++ b/nodejs/docs/test-parallel.mdx @@ -166,8 +166,15 @@ test.describe.configure({ lock: 'user-settings' }); Playwright acquires all the locks of a test before the test starts and releases them when it finishes. -:::note +The built-in `exclusive` lock runs a test in isolation: it starts only when no other tests are running, and no other tests start until it finishes. All other tests continue to run in parallel with each other. This is useful for a few tests that are sensitive to any concurrent activity, for example tests that measure performance or restart a shared service. + +```js +test('restart the server', { lock: 'exclusive' }, async () => { + // No other test runs while this one is running. +}); +``` +:::note In the default and [serial](#serial-mode) modes, all tests in a file run together in order, so a lock declared on any test is held for the duration of the whole file. ::: diff --git a/nodejs/docs/test-reporters.mdx b/nodejs/docs/test-reporters.mdx index ef6c8afbfe..d2753c9330 100644 --- a/nodejs/docs/test-reporters.mdx +++ b/nodejs/docs/test-reporters.mdx @@ -81,6 +81,25 @@ export default defineConfig({ }); ``` +### Redacting secrets + +Pass a `secrets` list to any reporter, built-in or custom, to hide sensitive values in its output. Each entry has a `value` with the sensitive text, and an optional `name`. The reporter sees `NAME`, or `` for an entry without a name, in place of the value in test and step titles, errors, console output, attachment names and attachment bodies. + +```js title="playwright.config.ts" +import { defineConfig } from '@playwright/test'; + +export default defineConfig({ + reporter: [ + ['list'], + ['html', { secrets: [{ name: 'PASSWORD', value: process.env.PASSWORD }] }], + ], +}); +``` + +In this example, the terminal output is not changed, while the HTML report never contains the password. + +Values are matched as plain text, so a short value could match unrelated text. Screenshots, videos, and attachments referenced by path, including trace files, are not changed. To hide secrets in traces, use the `secrets` option of [testOptions.trace](/api/class-testoptions.mdx#test-options-trace). + ## Built-in reporters All built-in reporters show detailed information about failures, and mostly differ in verbosity for successful runs. diff --git a/nodejs/docs/test-sharding.mdx b/nodejs/docs/test-sharding.mdx index 255b704f9a..3087d2454d 100644 --- a/nodejs/docs/test-sharding.mdx +++ b/nodejs/docs/test-sharding.mdx @@ -111,7 +111,7 @@ jobs: - name: Upload blob report to GitHub Actions Artifacts if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: blob-report-${{ matrix.shardIndex }} path: blob-report @@ -148,7 +148,7 @@ jobs: run: npx playwright merge-reports --reporter html ./all-blob-reports - name: Upload HTML report - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: html-report--attempt-${{ github.run_attempt }} path: playwright-report diff --git a/nodejs/docs/test-ui-mode.mdx b/nodejs/docs/test-ui-mode.mdx index 7004a5a78c..0e152049b9 100644 --- a/nodejs/docs/test-ui-mode.mdx +++ b/nodejs/docs/test-ui-mode.mdx @@ -129,7 +129,9 @@ npx playwright test --ui-port=8080 --ui-host=0.0.0.0 ``` :::note -Be aware that when specifying the `--ui-host=0.0.0.0` flag, UI Mode with your traces, the passwords and secrets are accessible from other machines inside your network. In the case of GitHub Codespaces, the ports are only accessible from your account by default. +Be aware that when specifying the `--ui-host` flag, UI Mode, with your traces, passwords and secrets, is accessible to anyone who can reach this address and port. With `--ui-host=0.0.0.0`, this includes other machines inside your network. In the case of GitHub Codespaces, the ports are only accessible from your account by default. + +When specifying the `--ui-port` flag, other users on your machine can connect to UI Mode on that port. They can run your tests and read your project files and traces. ::: diff --git a/python/docs/actionability.mdx b/python/docs/actionability.mdx index 14eb41a7fc..c5393905c6 100644 --- a/python/docs/actionability.mdx +++ b/python/docs/actionability.mdx @@ -146,6 +146,7 @@ For example, consider a scenario where Playwright will click `Sign Up` button re [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api-testing.mdx b/python/docs/api-testing.mdx index bb98e3b5cf..15aaf27a53 100644 --- a/python/docs/api-testing.mdx +++ b/python/docs/api-testing.mdx @@ -296,6 +296,7 @@ context = browser.new_context(storage_state=state) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-apirequest.mdx b/python/docs/api/class-apirequest.mdx index f928de7fba..90afd983c2 100644 --- a/python/docs/api/class-apirequest.mdx +++ b/python/docs/api/class-apirequest.mdx @@ -182,6 +182,7 @@ api_request.new_context(**kwargs) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-apirequestcontext.mdx b/python/docs/api/class-apirequestcontext.mdx index 0acddda416..9cedb4a2fa 100644 --- a/python/docs/api/class-apirequestcontext.mdx +++ b/python/docs/api/class-apirequestcontext.mdx @@ -928,6 +928,7 @@ api_request_context.tracing [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-apiresponse.mdx b/python/docs/api/class-apiresponse.mdx index b92b8c9044..1f237a78d3 100644 --- a/python/docs/api/class-apiresponse.mdx +++ b/python/docs/api/class-apiresponse.mdx @@ -355,6 +355,7 @@ api_response.url [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-apiresponseassertions.mdx b/python/docs/api/class-apiresponseassertions.mdx index 31154e8e65..da1a7c80b4 100644 --- a/python/docs/api/class-apiresponseassertions.mdx +++ b/python/docs/api/class-apiresponseassertions.mdx @@ -121,6 +121,7 @@ await expect(response).to_be_ok() [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-browser.mdx b/python/docs/api/class-browser.mdx index 7b7fb7ac8b..57ce4cbe0b 100644 --- a/python/docs/api/class-browser.mdx +++ b/python/docs/api/class-browser.mdx @@ -755,12 +755,12 @@ await browser.stop_tracing() **Arguments** -- `page` [Page] *(optional)*# - - Optional, if specified, tracing includes screenshots of the given page. - `categories` [List]\[[str]\] *(optional)*# specify custom categories to use instead of default. +- `page` [Page] *(optional)*# + + Optional, if specified, tracing includes screenshots of the given page. - `path` [Union]\[[str], [pathlib.Path]\] *(optional)*# A path to write the trace file to. @@ -958,6 +958,7 @@ browser.on("disconnected", handler) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-browsercontext.mdx b/python/docs/api/class-browsercontext.mdx index 1ad2037c46..a2a940f9b9 100644 --- a/python/docs/api/class-browsercontext.mdx +++ b/python/docs/api/class-browsercontext.mdx @@ -897,7 +897,7 @@ Enabling routing disables http cache. - `url` [str] | [Pattern] | [Callable]\[[URL]\]:[bool]# A glob pattern, regex pattern, or predicate that receives a [URL] to match during routing. If [base_url](/api/class-browser.mdx#browser-new-context-option-base-url) is set in the context options and the provided URL is a string that does not start with `*`, it is resolved using the [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. -- `handler` [Callable]\[[Route], [Request]\]:[Promise]\[[Any]\] | [Any]# +- `handler` [Callable]\[[Route]\] | [Callable]\[[Route], [Request]\]# handler function to route the request. - `times` [int] *(optional)* Added in: v1.15# @@ -974,14 +974,14 @@ Below is an example of a simple handler that blocks some websocket messages. See ```py -def message_handler(ws: WebSocketRoute, message: Union[str, bytes]): +def message_handler(server: WebSocketRoute, message: Union[str, bytes]): if message == "to-be-blocked": return - ws.send(message) + server.send(message) def handler(ws: WebSocketRoute): - ws.route_send(lambda message: message_handler(ws, message)) - ws.connect() + server = ws.connect_to_server() + ws.on_message(lambda message: message_handler(server, message)) context.route_web_socket("/ws", handler) ``` @@ -990,14 +990,14 @@ context.route_web_socket("/ws", handler) ```py -def message_handler(ws: WebSocketRoute, message: Union[str, bytes]): +def message_handler(server: WebSocketRoute, message: Union[str, bytes]): if message == "to-be-blocked": return - ws.send(message) + server.send(message) -async def handler(ws: WebSocketRoute): - ws.route_send(lambda message: message_handler(ws, message)) - await ws.connect() +def handler(ws: WebSocketRoute): + server = ws.connect_to_server() + ws.on_message(lambda message: message_handler(server, message)) await context.route_web_socket("/ws", handler) ``` @@ -1357,7 +1357,7 @@ browser_context.unroute(url, **kwargs) - `url` [str] | [Pattern] | [Callable]\[[URL]\]:[bool]# A glob pattern, regex pattern, or predicate receiving [URL] used to register a routing with [browser_context.route()](/api/class-browsercontext.mdx#browser-context-route). -- `handler` [Callable]\[[Route], [Request]\]:[Promise]\[[Any]\] | [Any] *(optional)*# +- `handler` [Callable]\[[Route]\] | [Callable]\[[Route], [Request]\] *(optional)*# Optional handler function used to register a routing with [browser_context.route()](/api/class-browsercontext.mdx#browser-context-route). @@ -2027,6 +2027,7 @@ browser_context.background_pages [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-browsertype.mdx b/python/docs/api/class-browsertype.mdx index 2f9f93b01e..e4927d886a 100644 --- a/python/docs/api/class-browsertype.mdx +++ b/python/docs/api/class-browsertype.mdx @@ -654,6 +654,7 @@ browser_type.name [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-cdpsession.mdx b/python/docs/api/class-cdpsession.mdx index 45b27507da..d67d4901fd 100644 --- a/python/docs/api/class-cdpsession.mdx +++ b/python/docs/api/class-cdpsession.mdx @@ -93,6 +93,9 @@ cdp_session.send(method, **kwargs) - `params` [Dict] *(optional)*# Optional method parameters. +- `timeout` [float] *(optional)* Added in: v1.65# + + Maximum time in milliseconds to wait for the response. Defaults to `0` - no timeout. **Returns** - [Dict]# @@ -130,6 +133,7 @@ cdp_session.on("close", handler) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-clock.mdx b/python/docs/api/class-clock.mdx index 1e695b5d4a..210898f227 100644 --- a/python/docs/api/class-clock.mdx +++ b/python/docs/api/class-clock.mdx @@ -53,7 +53,7 @@ await page.clock.fast_forward("30:00") **Arguments** - `ticks` [int] | [str]# - Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. + Time may be a finite number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. **Returns** - [NoneType]# @@ -230,7 +230,7 @@ await page.clock.run_for("30:00") **Arguments** - `ticks` [int] | [str]# - Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. + Time may be a finite number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. **Returns** - [NoneType]# @@ -343,6 +343,7 @@ await page.clock.set_system_time("2020-02-02") [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-consolemessage.mdx b/python/docs/api/class-consolemessage.mdx index 0eafa8a7cb..f10e4dba17 100644 --- a/python/docs/api/class-consolemessage.mdx +++ b/python/docs/api/class-consolemessage.mdx @@ -208,6 +208,7 @@ console_message.worker [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-credentials.mdx b/python/docs/api/class-credentials.mdx index 06d07919ca..1ddd5d37c8 100644 --- a/python/docs/api/class-credentials.mdx +++ b/python/docs/api/class-credentials.mdx @@ -340,6 +340,7 @@ credentials.install() [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-debugger.mdx b/python/docs/api/class-debugger.mdx index 88395a4adc..a1890098a1 100644 --- a/python/docs/api/class-debugger.mdx +++ b/python/docs/api/class-debugger.mdx @@ -159,6 +159,7 @@ debugger.on("pausedstatechanged", handler) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-dialog.mdx b/python/docs/api/class-dialog.mdx index 606137e182..c702ff6379 100644 --- a/python/docs/api/class-dialog.mdx +++ b/python/docs/api/class-dialog.mdx @@ -200,6 +200,7 @@ dialog.type [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-disposable.mdx b/python/docs/api/class-disposable.mdx new file mode 100644 index 0000000000..29b0f7fbed --- /dev/null +++ b/python/docs/api/class-disposable.mdx @@ -0,0 +1,109 @@ +--- +id: class-disposable +title: "Disposable" +--- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import HTMLCard from '@site/src/components/HTMLCard'; + + +[Disposable] is returned from various methods to allow undoing the corresponding action. For example, [page.add_init_script()](/api/class-page.mdx#page-add-init-script) returns a [Disposable] that can be used to remove the init script. + + +--- + +## Methods + +### close {/* #disposable-close */} + +Added in: v1.59disposable.close + +Removes the associated resource. For example, removes the init script installed via [page.add_init_script()](/api/class-page.mdx#page-add-init-script) or [browser_context.add_init_script()](/api/class-browsercontext.mdx#browser-context-add-init-script). + +**Usage** + +```python +disposable.close() +``` + +**Returns** +- [NoneType]# + + +[APIRequest]: /api/class-apirequest.mdx "APIRequest" +[APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" +[APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /api/class-apiresponseassertions.mdx "APIResponseAssertions" +[Browser]: /api/class-browser.mdx "Browser" +[BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" +[BrowserType]: /api/class-browsertype.mdx "BrowserType" +[CDPSession]: /api/class-cdpsession.mdx "CDPSession" +[Clock]: /api/class-clock.mdx "Clock" +[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage" +[Credentials]: /api/class-credentials.mdx "Credentials" +[Debugger]: /api/class-debugger.mdx "Debugger" +[Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" +[Download]: /api/class-download.mdx "Download" +[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" +[Error]: /api/class-error.mdx "Error" +[FileChooser]: /api/class-filechooser.mdx "FileChooser" +[FormData]: /api/class-formdata.mdx "FormData" +[Frame]: /api/class-frame.mdx "Frame" +[FrameLocator]: /api/class-framelocator.mdx "FrameLocator" +[JSHandle]: /api/class-jshandle.mdx "JSHandle" +[Keyboard]: /api/class-keyboard.mdx "Keyboard" +[Locator]: /api/class-locator.mdx "Locator" +[LocatorAssertions]: /api/class-locatorassertions.mdx "LocatorAssertions" +[Mouse]: /api/class-mouse.mdx "Mouse" +[Page]: /api/class-page.mdx "Page" +[PageAssertions]: /api/class-pageassertions.mdx "PageAssertions" +[Playwright]: /api/class-playwright.mdx "Playwright" +[Request]: /api/class-request.mdx "Request" +[Response]: /api/class-response.mdx "Response" +[Route]: /api/class-route.mdx "Route" +[Screencast]: /api/class-screencast.mdx "Screencast" +[Selectors]: /api/class-selectors.mdx "Selectors" +[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError" +[Touchscreen]: /api/class-touchscreen.mdx "Touchscreen" +[Tracing]: /api/class-tracing.mdx "Tracing" +[Video]: /api/class-video.mdx "Video" +[WebError]: /api/class-weberror.mdx "WebError" +[WebMCP]: /api/class-webmcp.mdx "WebMCP" +[WebSocket]: /api/class-websocket.mdx "WebSocket" +[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute" +[WebStorage]: /api/class-webstorage.mdx "WebStorage" +[Worker]: /api/class-worker.mdx "Worker" +[Element]: https://developer.mozilla.org/en-US/docs/Web/API/element "Element" +[EvaluationArgument]: /evaluating.mdx#evaluation-argument "EvaluationArgument" +[Promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise" +[iterator]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols "Iterator" +[origin]: https://developer.mozilla.org/en-US/docs/Glossary/Origin "Origin" +[selector]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors "selector" +[Serializable]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#Description "Serializable" +[UIEvent.detail]: https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail "UIEvent.detail" +[UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time" +[xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath" + +[Any]: https://docs.python.org/3/library/typing.html#typing.Any "Any" +[bool]: https://docs.python.org/3/library/stdtypes.html "bool" +[bytes]: https://docs.python.org/3/library/stdtypes.html#bytes "bytes" +[Callable]: https://docs.python.org/3/library/typing.html#typing.Callable "Callable" +[EventContextManager]: https://docs.python.org/3/reference/datamodel.html#context-managers "Event context manager" +[EventEmitter]: https://pyee.readthedocs.io/en/latest/#pyee.BaseEventEmitter "EventEmitter" +[Exception]: https://docs.python.org/3/library/exceptions.html#Exception "Exception" +[Dict]: https://docs.python.org/3/library/typing.html#typing.Dict "Dict" +[float]: https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex "float" +[int]: https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex "int" +[List]: https://docs.python.org/3/library/typing.html#typing.List "List" +[NoneType]: https://docs.python.org/3/library/constants.html#None "None" +[Pattern]: https://docs.python.org/3/library/re.html "Pattern" +[URL]: https://en.wikipedia.org/wiki/URL "URL" +[pathlib.Path]: https://realpython.com/python-pathlib/ "pathlib.Path" +[str]: https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str "str" +[Union]: https://docs.python.org/3/library/typing.html#typing.Union "Union" +[datetime]: https://docs.python.org/3/library/datetime.html#datetime.datetime "datetime" + +[all available image tags]: https://mcr.microsoft.com/en-us/product/playwright/python/about "all available image tags" +[Microsoft Artifact Registry]: https://mcr.microsoft.com/en-us/product/playwright/python/about "Microsoft Artifact Registry" +[Dockerfile.noble]: https://github.com/microsoft/playwright-python/blob/main/utils/docker/Dockerfile.noble "Dockerfile.noble" diff --git a/python/docs/api/class-download.mdx b/python/docs/api/class-download.mdx index 57d58052e2..9c204347fe 100644 --- a/python/docs/api/class-download.mdx +++ b/python/docs/api/class-download.mdx @@ -233,6 +233,7 @@ download.url [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-elementhandle.mdx b/python/docs/api/class-elementhandle.mdx index ca5cf98bc6..c8d11138eb 100644 --- a/python/docs/api/class-elementhandle.mdx +++ b/python/docs/api/class-elementhandle.mdx @@ -1356,9 +1356,18 @@ await handle.select_option(value=["red", "green", "blue"]) **Arguments** +- `element` [ElementHandle] | [List]\[[ElementHandle]\] *(optional)*# + + Option elements to select. Optional. - `force` [bool] *(optional)* Added in: v1.13# Whether to bypass the [actionability](../actionability.mdx) checks. Defaults to `false`. +- `index` [int] | [List]\[[int]\] *(optional)*# + + Options to select by index. Optional. +- `label` [str] | [List]\[[str]\] *(optional)*# + + Options to select by label. If the `` has the `multiple` attribute, all given options are selected, otherwise only the first option matching one of the passed options is selected. Optional. -- `label` [str] | [List]\[[str]\] *(optional)*# - - Options to select by label. If the `` has the `multiple` attribute, all given options are selected, otherwise only the first option matching one of the passed options is selected. Optional. - `no_wait_after` [bool] *(optional)*# :::warning[Deprecated] @@ -2810,18 +2807,9 @@ await frame.select_option("select#colors", value=["red", "green", "blue"]) - `timeout` [float] *(optional)*# Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [browser_context.set_default_timeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.set_default_timeout()](/api/class-page.mdx#page-set-default-timeout) methods. -- `element` [ElementHandle] | [List]\[[ElementHandle]\] *(optional)*# - - Option elements to select. Optional. -- `index` [int] | [List]\[[int]\] *(optional)*# - - Options to select by index. Optional. - `value` [str] | [List]\[[str]\] *(optional)*# Options to select by value. If the `` has the `multiple` attribute, all given options are selected, otherwise only the first option matching one of the passed options is selected. Optional. **Returns** - [List]\[[str]\]# @@ -3327,6 +3315,7 @@ frame.wait_for_timeout(timeout) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-framelocator.mdx b/python/docs/api/class-framelocator.mdx index 70ebe7cee2..3daf7ad513 100644 --- a/python/docs/api/class-framelocator.mdx +++ b/python/docs/api/class-framelocator.mdx @@ -802,6 +802,7 @@ frame_locator.nth(index) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-jshandle.mdx b/python/docs/api/class-jshandle.mdx index 0ec46f2aeb..977857fdd8 100644 --- a/python/docs/api/class-jshandle.mdx +++ b/python/docs/api/class-jshandle.mdx @@ -266,6 +266,7 @@ js_handle.as_element() [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-keyboard.mdx b/python/docs/api/class-keyboard.mdx index 1d0efe870d..c6ec9275f8 100644 --- a/python/docs/api/class-keyboard.mdx +++ b/python/docs/api/class-keyboard.mdx @@ -375,6 +375,7 @@ keyboard.up(key) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-locator.mdx b/python/docs/api/class-locator.mdx index 572827f0a7..2009754f9b 100644 --- a/python/docs/api/class-locator.mdx +++ b/python/docs/api/class-locator.mdx @@ -2959,9 +2959,18 @@ await element.select_option(value=["red", "green", "blue"]) **Arguments** +- `element` [ElementHandle] | [List]\[[ElementHandle]\] *(optional)*# + + Option elements to select. Optional. - `force` [bool] *(optional)*# Whether to bypass the [actionability](../actionability.mdx) checks. Defaults to `false`. +- `index` [int] | [List]\[[int]\] *(optional)*# + + Options to select by index. Optional. +- `label` [str] | [List]\[[str]\] *(optional)*# + + Options to select by label. If the `` has the `multiple` attribute, all given options are selected, otherwise only the first option matching one of the passed options is selected. Optional. -- `label` [str] | [List]\[[str]\] *(optional)*# - - Options to select by label. If the `` has the `multiple` attribute, all given options are selected, otherwise only the first option matching one of the passed options is selected. Optional. - `no_wait_after` [bool] *(optional)*# :::warning[Deprecated] @@ -5708,18 +5717,9 @@ await page.select_option("select#colors", value=["red", "green", "blue"]) - `timeout` [float] *(optional)*# Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [browser_context.set_default_timeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.set_default_timeout()](/api/class-page.mdx#page-set-default-timeout) methods. -- `element` [ElementHandle] | [List]\[[ElementHandle]\] *(optional)*# - - Option elements to select. Optional. -- `index` [int] | [List]\[[int]\] *(optional)*# - - Options to select by index. Optional. - `value` [str] | [List]\[[str]\] *(optional)*# Options to select by value. If the `` has the `multiple` attribute, all given options are selected, otherwise only the first option matching one of the passed options is selected. Optional. **Returns** - [List]\[[str]\]# @@ -6247,6 +6247,7 @@ await page.wait_for_timeout(1000) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-pageassertions.mdx b/python/docs/api/class-pageassertions.mdx index f964cb0e82..5bfe850243 100644 --- a/python/docs/api/class-pageassertions.mdx +++ b/python/docs/api/class-pageassertions.mdx @@ -301,6 +301,7 @@ await expect(page).to_match_aria_snapshot(''' [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-playwright.mdx b/python/docs/api/class-playwright.mdx index 897d29cd67..f0fe586f3b 100644 --- a/python/docs/api/class-playwright.mdx +++ b/python/docs/api/class-playwright.mdx @@ -263,6 +263,7 @@ playwright.webkit [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-request.mdx b/python/docs/api/class-request.mdx index 3075bb315d..bf974ba8af 100644 --- a/python/docs/api/class-request.mdx +++ b/python/docs/api/class-request.mdx @@ -534,6 +534,7 @@ request.url [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-response.mdx b/python/docs/api/class-response.mdx index 6f70eff6e3..0027733ac1 100644 --- a/python/docs/api/class-response.mdx +++ b/python/docs/api/class-response.mdx @@ -61,7 +61,7 @@ response.finished() ``` **Returns** -- [NoneType] | [str]# +- [NoneType]# --- @@ -389,6 +389,7 @@ response.url [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-route.mdx b/python/docs/api/class-route.mdx index ba1a31a9a5..c7814c79bb 100644 --- a/python/docs/api/class-route.mdx +++ b/python/docs/api/class-route.mdx @@ -499,6 +499,7 @@ route.request [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-screencast.mdx b/python/docs/api/class-screencast.mdx index 82a695d31e..6d44452e91 100644 --- a/python/docs/api/class-screencast.mdx +++ b/python/docs/api/class-screencast.mdx @@ -260,6 +260,7 @@ screencast.stop() [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-selectors.mdx b/python/docs/api/class-selectors.mdx index 079b9a0a5e..f403570ca4 100644 --- a/python/docs/api/class-selectors.mdx +++ b/python/docs/api/class-selectors.mdx @@ -164,6 +164,7 @@ selectors.set_test_id_attribute(attribute_name) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-timeouterror.mdx b/python/docs/api/class-timeouterror.mdx index 61ee7c7a1f..634ed12656 100644 --- a/python/docs/api/class-timeouterror.mdx +++ b/python/docs/api/class-timeouterror.mdx @@ -74,6 +74,7 @@ asyncio.run(main()) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-touchscreen.mdx b/python/docs/api/class-touchscreen.mdx index 8f6d70839c..d0908c19bf 100644 --- a/python/docs/api/class-touchscreen.mdx +++ b/python/docs/api/class-touchscreen.mdx @@ -58,6 +58,7 @@ touchscreen.tap(x, y) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-tracing.mdx b/python/docs/api/class-tracing.mdx index 3d37e95e1c..03b707e770 100644 --- a/python/docs/api/class-tracing.mdx +++ b/python/docs/api/class-tracing.mdx @@ -421,6 +421,7 @@ tracing.stop_har() [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-video.mdx b/python/docs/api/class-video.mdx index 8c231cb3a4..a2ab3489e6 100644 --- a/python/docs/api/class-video.mdx +++ b/python/docs/api/class-video.mdx @@ -106,6 +106,7 @@ video.save_as(path) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-weberror.mdx b/python/docs/api/class-weberror.mdx index e65552b385..834aa23c6e 100644 --- a/python/docs/api/class-weberror.mdx +++ b/python/docs/api/class-weberror.mdx @@ -116,6 +116,7 @@ web_error.page [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-webmcp.mdx b/python/docs/api/class-webmcp.mdx index a52c09a280..b549358e3a 100644 --- a/python/docs/api/class-webmcp.mdx +++ b/python/docs/api/class-webmcp.mdx @@ -110,6 +110,7 @@ web_mcp.tools(**kwargs) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-websocket.mdx b/python/docs/api/class-websocket.mdx index dcba7a7820..6d4344a112 100644 --- a/python/docs/api/class-websocket.mdx +++ b/python/docs/api/class-websocket.mdx @@ -197,6 +197,7 @@ web_socket.on("socketerror", handler) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-websocketroute.mdx b/python/docs/api/class-websocketroute.mdx index 7289e0ca38..11093bbfbf 100644 --- a/python/docs/api/class-websocketroute.mdx +++ b/python/docs/api/class-websocketroute.mdx @@ -245,7 +245,7 @@ web_socket_route.on_close(handler) ``` **Arguments** -- `handler` [Callable]\[[int] | [undefined]\]:[Promise]\[[Any]\] | [Any]# +- `handler` [Callable]\[[int] | [undefined], [str] | [undefined]\]:[Promise]\[[Any]\] | [Any]# Function that will handle WebSocket closure. Received an optional [close code](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code) and an optional [close reason](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#reason). @@ -270,7 +270,7 @@ web_socket_route.on_message(handler) ``` **Arguments** -- `handler` [Callable]\[[str]\]:[Promise]\[[Any]\] | [Any]# +- `handler` [Callable]\[[str] | [bytes]\]:[Promise]\[[Any]\] | [Any]# Function that will handle messages. @@ -400,6 +400,7 @@ web_socket_route.url [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-webstorage.mdx b/python/docs/api/class-webstorage.mdx index 22f1195599..0af4d4e358 100644 --- a/python/docs/api/class-webstorage.mdx +++ b/python/docs/api/class-webstorage.mdx @@ -170,6 +170,7 @@ web_storage.set_item(name, value) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/api/class-worker.mdx b/python/docs/api/class-worker.mdx index 0371307cb1..23b56f72c9 100644 --- a/python/docs/api/class-worker.mdx +++ b/python/docs/api/class-worker.mdx @@ -203,6 +203,7 @@ worker.on("console", handler) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/aria-snapshots.mdx b/python/docs/aria-snapshots.mdx index d2f467e7e0..d1379f4a6d 100644 --- a/python/docs/aria-snapshots.mdx +++ b/python/docs/aria-snapshots.mdx @@ -479,6 +479,7 @@ The `aria-invalid` value is surfaced directly. A value of `true` renders as `[in [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/auth.mdx b/python/docs/auth.mdx index f764a6f401..d9cfde6a5b 100644 --- a/python/docs/auth.mdx +++ b/python/docs/auth.mdx @@ -219,6 +219,7 @@ await context.add_init_script("""(storage => { [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/browser-contexts.mdx b/python/docs/browser-contexts.mdx index 64ee1c8b54..6a720ff349 100644 --- a/python/docs/browser-contexts.mdx +++ b/python/docs/browser-contexts.mdx @@ -130,6 +130,7 @@ asyncio.run(main()) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/browsers.mdx b/python/docs/browsers.mdx index 03cea01e72..185bfaff54 100644 --- a/python/docs/browsers.mdx +++ b/python/docs/browsers.mdx @@ -586,6 +586,7 @@ playwright uninstall --all [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/chrome-extensions.mdx b/python/docs/chrome-extensions.mdx index a5087b497d..544a543e48 100644 --- a/python/docs/chrome-extensions.mdx +++ b/python/docs/chrome-extensions.mdx @@ -214,6 +214,7 @@ def test_popup_page(page: Page, extension_id: str) -> None: [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/ci-intro.mdx b/python/docs/ci-intro.mdx index 6b65ad5e3b..d1eea31c01 100644 --- a/python/docs/ci-intro.mdx +++ b/python/docs/ci-intro.mdx @@ -43,7 +43,7 @@ jobs: run: python -m playwright install --with-deps - name: Run your tests run: pytest --tracing=retain-on-failure - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v5 if: ${{ !cancelled() }} with: name: playwright-traces @@ -112,6 +112,7 @@ Artifacts like trace files or console logs contain information about your test e [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/ci.mdx b/python/docs/ci.mdx index 41fa84c1a2..9d6a5a2478 100644 --- a/python/docs/ci.mdx +++ b/python/docs/ci.mdx @@ -82,7 +82,7 @@ jobs: name: 'Playwright Tests' runs-on: ubuntu-latest container: - image: mcr.microsoft.com/playwright/python:v1.64.0-noble + image: mcr.microsoft.com/playwright/python:v1.64.1-noble options: --user 1001 steps: - uses: actions/checkout@v6 @@ -113,6 +113,7 @@ jobs: if: github.event.deployment_status.state == 'success' steps: - uses: actions/checkout@v6 + - name: Set up Python uses: actions/setup-python@v6 with: python-version: '3.13' @@ -171,7 +172,7 @@ trigger: pool: vmImage: ubuntu-latest -container: mcr.microsoft.com/playwright/python:v1.64.0-noble +container: mcr.microsoft.com/playwright/python:v1.64.1-noble steps: - task: UsePythonVersion@0 @@ -195,7 +196,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In executors: pw-noble-development: docker: - - image: mcr.microsoft.com/playwright/python:v1.64.0-noble + - image: mcr.microsoft.com/playwright/python:v1.64.1-noble ``` Note: When using the docker agent definition, you are specifying the resource class of where playwright runs to the 'medium' tier [here](https://circleci.com/docs/configuration-reference?#docker-execution-environment). The default behavior of Playwright is to set the number of workers to the detected core count (2 in the case of the medium tier). Overriding the number of workers to greater than this number will cause unnecessary timeouts and failures. @@ -206,7 +207,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image]( ```groovy pipeline { - agent { docker { image 'mcr.microsoft.com/playwright/python:v1.64.0-noble' } } + agent { docker { image 'mcr.microsoft.com/playwright/python:v1.64.1-noble' } } stages { stage('e2e-tests') { steps { @@ -223,7 +224,7 @@ pipeline { Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](./docker.mdx)). ```yml -image: mcr.microsoft.com/playwright/python:v1.64.0-noble +image: mcr.microsoft.com/playwright/python:v1.64.1-noble ``` ### GitLab CI @@ -236,7 +237,7 @@ stages: tests: stage: test - image: mcr.microsoft.com/playwright/python:v1.64.0-noble + image: mcr.microsoft.com/playwright/python:v1.64.1-noble script: ... ``` @@ -279,6 +280,7 @@ xvfb-run pytest [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/clock.mdx b/python/docs/clock.mdx index 25dcd29014..f74a1d6e21 100644 --- a/python/docs/clock.mdx +++ b/python/docs/clock.mdx @@ -320,6 +320,7 @@ await expect(locator).to_have_text("2/2/2024, 10:00:02 AM") [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/codegen-intro.mdx b/python/docs/codegen-intro.mdx index 81b3fb87d9..76afac29c7 100644 --- a/python/docs/codegen-intro.mdx +++ b/python/docs/codegen-intro.mdx @@ -76,6 +76,7 @@ You can generate tests using emulation for specific viewports, devices, color sc [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/codegen.mdx b/python/docs/codegen.mdx index cdf5854206..4a9d93c249 100644 --- a/python/docs/codegen.mdx +++ b/python/docs/codegen.mdx @@ -225,6 +225,7 @@ asyncio.run(main()) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/debug.mdx b/python/docs/debug.mdx index 0f15bb0063..532761da1d 100644 --- a/python/docs/debug.mdx +++ b/python/docs/debug.mdx @@ -334,6 +334,7 @@ await chromium.launch(headless=False, slow_mo=100) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/dialogs.mdx b/python/docs/dialogs.mdx index 21f6a73c05..7b81ff52ea 100644 --- a/python/docs/dialogs.mdx +++ b/python/docs/dialogs.mdx @@ -177,6 +177,7 @@ This will wait for the print dialog to be opened after the button is clicked. Ma [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/docker.mdx b/python/docs/docker.mdx index d3bcff98f5..27f5cfc0b2 100644 --- a/python/docs/docker.mdx +++ b/python/docs/docker.mdx @@ -22,7 +22,7 @@ This Docker image is intended to be used for testing and development purposes on ### Pull the image ```bash -docker pull mcr.microsoft.com/playwright/python:v1.64.0-noble +docker pull mcr.microsoft.com/playwright/python:v1.64.1-noble ``` ### Run the image @@ -34,7 +34,7 @@ By default, the Docker image will use the `root` user to run the browsers. This On trusted websites, you can avoid creating a separate user and use root for it since you trust the code which will run on the browsers. ```bash -docker run -it --rm --ipc=host mcr.microsoft.com/playwright/python:v1.64.0-noble /bin/bash +docker run -it --rm --ipc=host mcr.microsoft.com/playwright/python:v1.64.1-noble /bin/bash ``` #### Crawling and scraping @@ -42,7 +42,7 @@ docker run -it --rm --ipc=host mcr.microsoft.com/playwright/python:v1.64.0-noble On untrusted websites, it's recommended to use a separate user for launching the browsers in combination with the seccomp profile. Inside the container or if you are using the Docker image as a base image you have to use `adduser` for it. ```bash -docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/python:v1.64.0-noble /bin/bash +docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/python:v1.64.1-noble /bin/bash ``` [`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions: @@ -82,7 +82,7 @@ You can run Playwright Server in Docker while keeping your tests running on the Start the Playwright Server in Docker: ```bash -docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.64.0-noble /bin/sh -c "npx -y playwright@1.64.0 run-server --port 3000 --host 0.0.0.0" +docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.64.1-noble /bin/sh -c "npx -y playwright@1.64.1 run-server --port 3000 --host 0.0.0.0" ``` #### Connecting to the Server @@ -122,7 +122,7 @@ async with async_playwright() as p: If you need to access local servers from within the Docker container: ```bash -docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.64.0-noble /bin/sh -c "npx -y playwright@1.64.0 run-server --port 3000 --host 0.0.0.0" +docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.64.1-noble /bin/sh -c "npx -y playwright@1.64.1 run-server --port 3000 --host 0.0.0.0" ``` This makes `hostmachine` point to the host's localhost. Your tests should use `hostmachine` instead of `localhost` when accessing local servers. @@ -138,7 +138,7 @@ For Docker and GitHub Codespaces environments, you can view and generate tests u ```json { - "image": "mcr.microsoft.com/playwright:v1.57.0", + "image": "mcr.microsoft.com/playwright:v1.64.1-noble", "forwardPorts": [6080], "features": { "desktop-lite": { @@ -155,10 +155,10 @@ Once this is enabled you can open the port specified in a new browser tab and yo See [all available image tags]. We currently publish images with the following tags: -- `:v1.64.0` - Playwright v1.64.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.64.0-noble` - Playwright v1.64.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.64.0-jammy` - Playwright v1.64.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish). -- `:v1.64.0-resolute` - Playwright v1.64.0 release docker image based on Ubuntu 26.04 LTS (Resolute Raccoon). +- `:v1.64.1` - Playwright v1.64.1 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). +- `:v1.64.1-noble` - Playwright v1.64.1 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). +- `:v1.64.1-jammy` - Playwright v1.64.1 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish). +- `:v1.64.1-resolute` - Playwright v1.64.1 release docker image based on Ubuntu 26.04 LTS (Resolute Raccoon). :::note @@ -183,7 +183,7 @@ To run Playwright inside Docker, you need to have Python, [Playwright browsers]( ```Dockerfile FROM python:3.12-bookworm -RUN pip install playwright==@1.64.0 && \ +RUN pip install playwright==@1.64.1 && \ playwright install --with-deps ``` @@ -201,6 +201,7 @@ RUN pip install playwright==@1.64.0 && \ [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/downloads.mdx b/python/docs/downloads.mdx index 6127c56957..538f15299b 100644 --- a/python/docs/downloads.mdx +++ b/python/docs/downloads.mdx @@ -108,6 +108,7 @@ For uploading files, see the [uploading files](./input.mdx#upload-files) section [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/emulation.mdx b/python/docs/emulation.mdx index d59cbe067c..1e2059e648 100644 --- a/python/docs/emulation.mdx +++ b/python/docs/emulation.mdx @@ -402,6 +402,48 @@ await page.emulate_media(media='print') playwright web in dark mode +The `"reducedMotion"`, `"forcedColors"` and `"contrast"` options emulate the `prefers-reduced-motion`, `forced-colors` and `prefers-contrast` media features the same way. Supported values are `'reduce'` and `'no-preference'` for reduced motion, `'active'` and `'none'` for forced colors, and `'more'` and `'no-preference'` for contrast. [page.emulate_media()](/api/class-page.mdx#page-emulate-media) changes them for a single page. + + + + +```py +# Create context with reduced motion, forced colors and more contrast +context = browser.new_context( + reduced_motion='reduce', # or 'no-preference' + forced_colors='active', # or 'none' + contrast='more' # or 'no-preference' +) + +# Change the media features for the page +page.emulate_media(reduced_motion='reduce', forced_colors='active', contrast='more') +``` + + + + +```py +# Create context with reduced motion, forced colors and more contrast +context = await browser.new_context( + reduced_motion='reduce', # or 'no-preference' + forced_colors='active', # or 'none' + contrast='more' # or 'no-preference' +) + +# Change the media features for the page +await page.emulate_media(reduced_motion='reduce', forced_colors='active', contrast='more') +``` + + + + ## User Agent The User Agent is included in the device and therefore you will rarely need to change it however if you do need to test a different user agent you can override it with the `userAgent` property. @@ -517,6 +559,7 @@ context = await browser.new_context( [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/evaluating.mdx b/python/docs/evaluating.mdx index 855d41f903..af4a1b0d09 100644 --- a/python/docs/evaluating.mdx +++ b/python/docs/evaluating.mdx @@ -300,6 +300,7 @@ await page.add_init_script(path="mocks/preload.js") [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/events.mdx b/python/docs/events.mdx index 77bbe83dba..84b936c44a 100644 --- a/python/docs/events.mdx +++ b/python/docs/events.mdx @@ -170,6 +170,7 @@ await page.evaluate("prompt('Enter a number:')") [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/extensibility.mdx b/python/docs/extensibility.mdx index f7e8be3695..ba3302f5bc 100644 --- a/python/docs/extensibility.mdx +++ b/python/docs/extensibility.mdx @@ -108,6 +108,7 @@ button_count = await page.locator("tag=button").count() [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/frames.mdx b/python/docs/frames.mdx index 5516cd084f..56096242fb 100644 --- a/python/docs/frames.mdx +++ b/python/docs/frames.mdx @@ -97,6 +97,7 @@ await frame.fill('#username-input', 'John') [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/getting-started-cli.mdx b/python/docs/getting-started-cli.mdx index ba9754648c..9da3f45a5c 100644 --- a/python/docs/getting-started-cli.mdx +++ b/python/docs/getting-started-cli.mdx @@ -343,6 +343,7 @@ This requires the [Playwright Extension](https://github.com/microsoft/playwright [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/getting-started-mcp.mdx b/python/docs/getting-started-mcp.mdx index 1797f160ed..11eeca46bd 100644 --- a/python/docs/getting-started-mcp.mdx +++ b/python/docs/getting-started-mcp.mdx @@ -201,7 +201,7 @@ A page that keeps animating or rendering costs CPU for as long as the browser is ``` When no tool call has completed for that long, the browser is closed, headed or not, the same way as if you had closed it by hand. The next tool call launches a new browser, so the agent navigates again. The timer never fires while a tool call is running. -- With `--isolated`, cookies and storage kept in memory are lost on an idle close. Use the persistent profile or `--storage-state` to keep them. +- With `--isolated`, cookies and storage kept in memory are lost on an idle close. Use the persistent profile or `--storage-state` to keep them. Each client has its own timer: the context of an idle client is closed while other clients keep working, and the browser is closed once no client has a context. - With `--cdp-endpoint` or `--extension`, the browser is not owned by the server, so there is no default timeout, and an explicit one only disconnects from it, leaving its pages open. With `--extension`, the next tool call goes through the connect flow again. - With `--shared-browser-context`, the timer spans all clients: a client that is idle while others keep working keeps its tabs and state, and the shared browser is closed only once every client has been idle for the timeout. @@ -270,6 +270,7 @@ Then point your MCP client to the HTTP endpoint: [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/handles.mdx b/python/docs/handles.mdx index 41fc03e4fe..e729353bed 100644 --- a/python/docs/handles.mdx +++ b/python/docs/handles.mdx @@ -259,6 +259,7 @@ await locator.click() [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/input.mdx b/python/docs/input.mdx index 4d4a1138bb..f0931b1251 100644 --- a/python/docs/input.mdx +++ b/python/docs/input.mdx @@ -697,6 +697,7 @@ await page.get_by_test_id("scrolling-container").evaluate("e => e.scrollTop += 1 [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/intro.mdx b/python/docs/intro.mdx index 134af6fb23..b4a25223e0 100644 --- a/python/docs/intro.mdx +++ b/python/docs/intro.mdx @@ -150,6 +150,7 @@ uv add --upgrade pytest-playwright playwright [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/languages.mdx b/python/docs/languages.mdx index ccab788054..ae9c900dc2 100644 --- a/python/docs/languages.mdx +++ b/python/docs/languages.mdx @@ -48,6 +48,7 @@ Playwright for .NET comes with MSTest, NUnit, xUnit, and xUnit v3 [base classes] [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/library.mdx b/python/docs/library.mdx index 7b0a11e10d..76c3188766 100644 --- a/python/docs/library.mdx +++ b/python/docs/library.mdx @@ -232,6 +232,7 @@ Cancelling a task that is running a Playwright call is not supported and results [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/locators.mdx b/python/docs/locators.mdx index 49a0a55728..4a9f30e1ee 100644 --- a/python/docs/locators.mdx +++ b/python/docs/locators.mdx @@ -1877,6 +1877,7 @@ For less commonly used locators, look at the [other locators](./other-locators.m [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/mock.mdx b/python/docs/mock.mdx index 4e8042b957..e0a324dd01 100644 --- a/python/docs/mock.mdx +++ b/python/docs/mock.mdx @@ -385,6 +385,7 @@ For more details, see [WebSocketRoute]. [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/navigations.mdx b/python/docs/navigations.mdx index 4fd83bef30..4beb0878e5 100644 --- a/python/docs/navigations.mdx +++ b/python/docs/navigations.mdx @@ -47,6 +47,10 @@ The code above loads the page and waits for the web page to fire the [load](http If the page does a client-side redirect before `load`, [page.goto()](/api/class-page.mdx#page-goto) will wait for the redirected page to fire the `load` event. ::: +:::note +In Firefox, a navigation triggered by the page can interrupt [page.goto()](/api/class-page.mdx#page-goto) with an `NS_BINDING_ABORTED` error. This is a [known Firefox limitation](https://github.com/microsoft/playwright/issues/20749). +::: + ## When is the page loaded? Modern pages perform numerous activities after the `load` event was fired. They fetch data lazily, populate UI, load expensive resources, scripts and styles after the `load` event was fired. There is no way to tell that the page is `loaded`, it depends on the page, framework, etc. So when can you start interacting with it? @@ -165,6 +169,7 @@ Playwright splits the process of showing a new document in a page into **navigat [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/network.mdx b/python/docs/network.mdx index b011dfe945..05fce1bdfb 100644 --- a/python/docs/network.mdx +++ b/python/docs/network.mdx @@ -551,6 +551,7 @@ It might be that you are using a mock tool such as Mock Service Worker (MSW). Wh [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/other-locators.mdx b/python/docs/other-locators.mdx index 190da83a29..1aedf573bc 100644 --- a/python/docs/other-locators.mdx +++ b/python/docs/other-locators.mdx @@ -883,6 +883,7 @@ For example, `css=article >> text=Hello` captures the element with the text `Hel [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/pages.mdx b/python/docs/pages.mdx index fb8b6eaaca..5c2eeea4e1 100644 --- a/python/docs/pages.mdx +++ b/python/docs/pages.mdx @@ -266,6 +266,7 @@ page.on("popup", handle_popup) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/pom.mdx b/python/docs/pom.mdx index b43b67fca3..d28a687659 100644 --- a/python/docs/pom.mdx +++ b/python/docs/pom.mdx @@ -114,6 +114,7 @@ await search_page.search("search query") [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/release-notes.mdx b/python/docs/release-notes.mdx index f0e49022b9..1b5a90ee27 100644 --- a/python/docs/release-notes.mdx +++ b/python/docs/release-notes.mdx @@ -2414,6 +2414,7 @@ This version of Playwright was also tested against the following stable channels [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/running-tests.mdx b/python/docs/running-tests.mdx index ba9f4ccc8e..9f49c6be99 100644 --- a/python/docs/running-tests.mdx +++ b/python/docs/running-tests.mdx @@ -217,6 +217,7 @@ Check out our [debugging guide](./debug.mdx) to learn more about the [Playwright [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/screenshots.mdx b/python/docs/screenshots.mdx index 8aecbda4a3..c3dd53fb61 100644 --- a/python/docs/screenshots.mdx +++ b/python/docs/screenshots.mdx @@ -137,6 +137,7 @@ await page.locator(".header").screenshot(path="screenshot.png") [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/selenium-grid.mdx b/python/docs/selenium-grid.mdx index 20ddb8d038..c1afface78 100644 --- a/python/docs/selenium-grid.mdx +++ b/python/docs/selenium-grid.mdx @@ -137,6 +137,7 @@ This means that Selenium 3 is supported in a best-effort manner, where Playwrigh [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/service-workers.mdx b/python/docs/service-workers.mdx index 37dd3db74c..b4a70c6ba5 100644 --- a/python/docs/service-workers.mdx +++ b/python/docs/service-workers.mdx @@ -203,6 +203,7 @@ Requests for updated Service Worker main script code currently cannot be routed [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/test-assertions.mdx b/python/docs/test-assertions.mdx index 39d642887e..09278aeb2f 100644 --- a/python/docs/test-assertions.mdx +++ b/python/docs/test-assertions.mdx @@ -127,6 +127,7 @@ def test_foobar(page: Page) -> None: [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/test-runners.mdx b/python/docs/test-runners.mdx index 987ed263a0..87b76bbf2b 100644 --- a/python/docs/test-runners.mdx +++ b/python/docs/test-runners.mdx @@ -298,6 +298,7 @@ async def test_foo(page: Page): [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/touch-events.mdx b/python/docs/touch-events.mdx index 37eaf4064b..e4e69d621d 100644 --- a/python/docs/touch-events.mdx +++ b/python/docs/touch-events.mdx @@ -320,6 +320,7 @@ asyncio.run(main()) [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/trace-viewer-intro.mdx b/python/docs/trace-viewer-intro.mdx index 5caeabcb38..70fed9dba3 100644 --- a/python/docs/trace-viewer-intro.mdx +++ b/python/docs/trace-viewer-intro.mdx @@ -110,6 +110,7 @@ To learn more check out our detailed guide on [Trace Viewer](/trace-viewer.mdx). [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/trace-viewer.mdx b/python/docs/trace-viewer.mdx index caaeb2ef66..ea921049e6 100644 --- a/python/docs/trace-viewer.mdx +++ b/python/docs/trace-viewer.mdx @@ -208,6 +208,7 @@ Next to the Actions tab you will find the Metadata tab which will show you more [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/videos.mdx b/python/docs/videos.mdx index d56f827e5c..f3035f82d4 100644 --- a/python/docs/videos.mdx +++ b/python/docs/videos.mdx @@ -119,6 +119,7 @@ Note that the video is only available after the page or browser context is close [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/webview2.mdx b/python/docs/webview2.mdx index caf41b58b6..e0da53a2dc 100644 --- a/python/docs/webview2.mdx +++ b/python/docs/webview2.mdx @@ -181,6 +181,7 @@ For debugging tests, see the Playwright [Debugging guide](./debug). [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/python/docs/writing-tests.mdx b/python/docs/writing-tests.mdx index 4bb6c8eb1a..b52fd29ce5 100644 --- a/python/docs/writing-tests.mdx +++ b/python/docs/writing-tests.mdx @@ -181,6 +181,7 @@ def test_main_navigation(page: Page): [Credentials]: /api/class-credentials.mdx "Credentials" [Debugger]: /api/class-debugger.mdx "Debugger" [Dialog]: /api/class-dialog.mdx "Dialog" +[Disposable]: /api/class-disposable.mdx "Disposable" [Download]: /api/class-download.mdx "Download" [ElementHandle]: /api/class-elementhandle.mdx "ElementHandle" [Error]: /api/class-error.mdx "Error" diff --git a/src/api_parser.js b/src/api_parser.js index 63ce8faf3f..9c21832d23 100644 --- a/src/api_parser.js +++ b/src/api_parser.js @@ -210,10 +210,7 @@ class ApiParser { const text = /** @type {string}*/(param.text); if (text.substring(text.lastIndexOf('>') + 1).trim()) throw new Error(`Extra information after type while processing "${memberName}".\nYou probably need an extra empty line before the description.\n================\n${text}`); - let typeStart = text.indexOf('<'); - while ('?e'.includes(text[typeStart - 1])) - typeStart--; - const name = text.substring(0, typeStart).replace(/\`/g, '').trim(); + const { name } = parseVariable(text); const comments = extractComments(spec); const metainfo = extractMetainfo(spec); if (metainfo.hidden) @@ -229,14 +226,28 @@ class ApiParser { */ parseType(spec, since) { const arg = parseVariable(spec.text); + if (!arg.alias && /\[\w+\]<"/.test(arg.type)) + throw new Error(`Write the enum name before the type, for example: \`sameSite\` "SameSiteAttribute" <"Strict"|"Lax"|"None">\nin: ${spec.text}`); + let expression = arg.type; const properties = []; /** @type {Object} */ const langAliases = {}; + if (arg.alias) { + // The name before the type names the enum, if the type has one. + // Otherwise, it is the default alias of the type. + const named = nameStringUnion(expression, arg.alias); + if (named) + expression = named; + else + langAliases.default = arg.alias; + } for (const child of /** @type {MarkdownLiNode[]} */ (spec.children) || []) { const childText = /** @type {string} */(child.text); const aliasMatch = childText.match(/^alias(?:-(\w+))?\s*:\s*(.*)$/); if (aliasMatch) { - langAliases[aliasMatch[1] || 'default'] = aliasMatch[2].trim(); + if (!aliasMatch[1]) + throw new Error(`Write the alias before the type, for example: \`cookies\` "Cookie" <[Array]<[Object]>>\nin: ${spec.text}`); + langAliases[aliasMatch[1]] = aliasMatch[2].trim(); continue; } const { name, text } = parseVariable(childText); @@ -244,14 +255,33 @@ class ApiParser { const childType = this.parseType(child, since); properties.push(docs.Member.createProperty({ langs: {}, since, deprecated: undefined, discouraged: undefined }, name, childType.type, comments, !childType.optional)); } - const type = docs.Type.parse(arg.type, properties, langAliases); + const type = docs.Type.parse(expression, properties, langAliases); return { type, optional: arg.optional }; } } /** + * Names the string union in a type expression: `null|"a"|"b"` named `E` + * becomes `null|[E]<"a"|"b">`. + * @param {string} expression + * @param {string} name + * @returns {string | null} null if the expression has no string union + */ +function nameStringUnion(expression, name) { + const unions = [...expression.matchAll(/"[^"]*"(?:\|"[^"]*")*/g)]; + if (!unions.length) + return null; + if (unions.length > 1) + throw new Error(`Cannot name "${name}" in "${expression}": it has more than one string union`); + const [union] = unions; + const start = /** @type {number} */ (union.index); + return expression.substring(0, start) + `[${name}]<${union[0]}>` + expression.substring(start + union[0].length); +} + +/** + * Parses a type line: `` `name` "Alias" ? text ``. The alias and `?` are optional. * @param {string} line - * @returns {{ name: string, type: string, text: string, optional: boolean }} + * @returns {{ name: string, type: string, text: string, optional: boolean, alias: string | undefined }} */ function parseVariable(line) { let match = line.match(/^`([^`]+)` (.*)/); @@ -265,6 +295,12 @@ function parseVariable(line) { throw new Error('Invalid argument: ' + line); const name = match[1]; let remainder = match[2]; + let alias; + const aliasMatch = remainder.match(/^"([^"]+)"\s+/); + if (aliasMatch) { + alias = aliasMatch[1]; + remainder = remainder.substring(aliasMatch[0].length); + } let optional = false; while ('?'.includes(remainder[0])) { if (remainder[0] === '?') @@ -281,7 +317,7 @@ function parseVariable(line) { if (c === '>') --depth; if (depth === 0) - return { name, type: remainder.substring(1, i), text: remainder.substring(i + 2), optional }; + return { name, type: remainder.substring(1, i), text: remainder.substring(i + 2), optional, alias }; } throw new Error('Should not be reached, line: ' + line); } diff --git a/src/components/GitHubStarButton/index.tsx b/src/components/GitHubStarButton/index.tsx index 4aa91d5ed5..c591ce7989 100644 --- a/src/components/GitHubStarButton/index.tsx +++ b/src/components/GitHubStarButton/index.tsx @@ -6,7 +6,7 @@ type StarButtonProps = { repo: string } -const STARS = '97k+'; // NOTE: this line is generated by src/generate.js. Do not change! +const STARS = '98k+'; // NOTE: this line is generated by src/generate.js. Do not change! const StarButton: React.FC = ({owner, repo}) => { if (!repo) diff --git a/src/documentation.js b/src/documentation.js index 23b1a48daf..8f0b99e72a 100644 --- a/src/documentation.js +++ b/src/documentation.js @@ -704,9 +704,13 @@ function parseTypeExpression(type) { } } let union = null; - if (type[firstTypeLength] === '|') + if (type[firstTypeLength] === '|') { union = parseTypeExpression(type.substring(firstTypeLength + 1)); - else if (type[firstTypeLength] === ',') + // In `[A]|[B], [C]`, the union ends at the comma: `[C]` is the next item + // of the list, not a part of the union. + next = union.next; + union.next = null; + } else if (type[firstTypeLength] === ',') next = parseTypeExpression(type.substring(firstTypeLength + 1)); if (template && !template.unionName && isStringUnion(template)) { @@ -780,22 +784,23 @@ function patchLinksInText(classOrMember, text, classesMap, membersMap, linkRende member = maybeMember; name = p2; } - if (p1 === 'param') { - const param = member.argsArray.find(a => a.name === name); + const param = member.argsArray.find(a => a.name === name); + const options = member.argsArray.find(a => a.name === 'options'); + const parts = name.split('.'); + const optionName = parts[0]; + const option = options?.type?.properties?.find(a => a.name === optionName); + // An argument can be a param in one language and an option in another, + // so a link of either kind also finds an argument of the other kind. + const asParam = p1 === 'param' ? !!param || !option : !option && !!param; + if (asParam) { if (!param) throw new Error(`Referenced parameter ${match} not found in the parent method ${member.name}\n=========\n${text}`); return linkRenderer({ member, param: { name, alias: param.alias }, href }) || match; - } else { - // p1 === 'option' - const options = member.argsArray.find(a => a.name === 'options'); - const parts = name.split('.'); - const optionName = parts[0]; - const option = options?.type?.properties?.find(a => a.name === optionName); - if (!option) - throw new Error(`Referenced option ${match} not found in the parent method ${member.name}\n=========\n${text}`); - parts[0] = option.alias; - return linkRenderer({ member, option: { name: optionName, alias: parts.join('.') }, href }) || match; } + if (!option) + throw new Error(`Referenced option ${match} not found in the parent method ${member.name}\n=========\n${text}`); + parts[0] = option.alias; + return linkRenderer({ member, option: { name: optionName, alias: parts.join('.') }, href }) || match; } throw new Error(`Undefined link prefix, expected event|method|property|param|option, got: ` + match); });