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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,3 @@ jobs:
name: playwright-report
path: playwright-report/
retention-days: 30

auto-merge:
name: Auto Merge
runs-on: ubuntu-latest
needs: [build_and_deploy_job, test]
if: github.repository == 'microsoft/playwright.dev' && startsWith(github.head_ref, 'roll/next-')
steps:
- name: Merge pull request
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
script: |
await github.rest.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
merge_method: 'squash',
commit_message: '',
});
12 changes: 8 additions & 4 deletions .github/workflows/roll-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ on:
# Every day at 10:05 UTC
- cron: "5 10 * * *"

permissions:
contents: write

jobs:
roll-docs:
name: Roll Playwright to ToT
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
Expand Down Expand Up @@ -49,11 +48,16 @@ jobs:
git add .
git commit -m "feat(roll): roll to ToT Playwright ($(date +"%d-%m-%y"))"
git push origin $BRANCH_NAME --force
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PLAYWRIGHT_APP_ID }}
private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }}
- name: Create Pull Request
uses: actions/github-script@v7
if: ${{ steps.prepare-branch.outputs.HAS_CHANGES == '1' }}
with:
github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
github-token: ${{ steps.app-token.outputs.token }}
script: |
await github.rest.pulls.create({
owner: 'microsoft',
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/roll-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,16 @@ jobs:
git add "**/versions.json"
git commit -m "feat(roll): roll to $VERSION Playwright"
git push origin $BRANCH_NAME --force
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PLAYWRIGHT_APP_ID }}
private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }}
- name: Check for existing Pull Request
id: check-pr
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
github-token: ${{ steps.app-token.outputs.token }}
script: |
const { data: pullRequests } = await github.rest.pulls.list({
owner: 'microsoft',
Expand All @@ -87,7 +92,7 @@ jobs:
uses: actions/github-script@v7
if: ${{ steps.prepare-branch.outputs.HAS_CHANGES == '1' && steps.check-pr.outputs.result == 'false' }}
with:
github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
github-token: ${{ steps.app-token.outputs.token }}
script: |
await github.rest.pulls.create({
owner: 'microsoft',
Expand Down
6 changes: 0 additions & 6 deletions dotnet/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -921,12 +921,6 @@ await BrowserContext.StorageStateAsync(options);
- `IndexedDB` [bool]? *(optional)* <font size="2">Added in: v1.51</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-storage-state-option-indexed-db"/><a href="#browser-context-storage-state-option-indexed-db" class="list-anchor">#</a>

Set to `true` to include [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) in the storage state snapshot. If your application uses IndexedDB to store authentication tokens, like Firebase Authentication, enable this.

:::note

IndexedDBs with typed arrays are currently not supported.
:::

- `Path` [string]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-storage-state-option-path"/><a href="#browser-context-storage-state-option-path" class="list-anchor">#</a>

The file path to save the storage state to. If [Path](/api/class-browsercontext.mdx#browser-context-storage-state-option-path) is a relative path, then it is resolved relative to current working directory. If no path is provided, storage state is still returned, but won't be saved to the disk.
Expand Down
30 changes: 30 additions & 0 deletions dotnet/docs/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,21 @@ await BrowserType.ConnectAsync(wsEndpoint, options);
- `Headers` [IDictionary]?&lt;[string], [string]&gt; *(optional)* <font size="2">Added in: v1.11</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-headers"/><a href="#browser-type-connect-option-headers" class="list-anchor">#</a>

Additional HTTP headers to be sent with web socket connect request. Optional.
- `Proxy` Proxy? *(optional)* <font size="2">Added in: v1.52</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-proxy"/><a href="#browser-type-connect-option-proxy" class="list-anchor">#</a>
- `Server` [string]

Proxy to be used for the remote connection. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
- `Bypass` [string]? *(optional)*

Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
- `Username` [string]? *(optional)*

Optional username to use if HTTP proxy requires authentication.
- `Password` [string]? *(optional)*

Optional password to use if HTTP proxy requires authentication.

Proxy settings to use for the connection between the client and the remote browser. Note this proxy **is not** used by the browser to load web pages.
- `SlowMo` [float]? *(optional)* <font size="2">Added in: v1.10</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-slow-mo"/><a href="#browser-type-connect-option-slow-mo" class="list-anchor">#</a>

Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0.
Expand Down Expand Up @@ -116,6 +131,21 @@ var page = defaultContext.Pages[0];
- `Headers` [IDictionary]?&lt;[string], [string]&gt; *(optional)* <font size="2">Added in: v1.11</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-headers"/><a href="#browser-type-connect-over-cdp-option-headers" class="list-anchor">#</a>

Additional HTTP headers to be sent with connect request. Optional.
- `Proxy` Proxy? *(optional)* <font size="2">Added in: v1.52</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-proxy"/><a href="#browser-type-connect-over-cdp-option-proxy" class="list-anchor">#</a>
- `Server` [string]

Proxy to be used for the remote connection. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
- `Bypass` [string]? *(optional)*

Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
- `Username` [string]? *(optional)*

Optional username to use if HTTP proxy requires authentication.
- `Password` [string]? *(optional)*

Optional password to use if HTTP proxy requires authentication.

Proxy settings to use for the connection between the client and the remote browser. Note this proxy **is not** used by the browser to load web pages.
- `SlowMo` [float]? *(optional)* <font size="2">Added in: v1.11</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-slow-mo"/><a href="#browser-type-connect-over-cdp-option-slow-mo" class="list-anchor">#</a>

Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0.
Expand Down
2 changes: 1 addition & 1 deletion dotnet/docs/pom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import HTMLCard from '@site/src/components/HTMLCard';

## Introduction

Large test suites can be structured to optimize ease of authoring and maintenance. Page object models are one such approach to structure your test suite.
Large test suites can be structured to optimize ease of authoring and maintenance. Page object models are one such approach to structure your test suite.

A page object represents a part of your web application. An e-commerce web application might have a home page, a listings page and a checkout page. Each of them can be represented by page object models.

Expand Down
6 changes: 0 additions & 6 deletions java/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -819,12 +819,6 @@ BrowserContext.storageState(options);
- `setIndexedDB` [boolean] *(optional)* <font size="2">Added in: v1.51</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-storage-state-option-indexed-db"/><a href="#browser-context-storage-state-option-indexed-db" class="list-anchor">#</a>

Set to `true` to include [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) in the storage state snapshot. If your application uses IndexedDB to store authentication tokens, like Firebase Authentication, enable this.

:::note

IndexedDBs with typed arrays are currently not supported.
:::

- `setPath` [Path] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-storage-state-option-path"/><a href="#browser-context-storage-state-option-path" class="list-anchor">#</a>

The file path to save the storage state to. If [setPath](/api/class-browsercontext.mdx#browser-context-storage-state-option-path) is a relative path, then it is resolved relative to current working directory. If no path is provided, storage state is still returned, but won't be saved to the disk.
Expand Down
30 changes: 30 additions & 0 deletions java/docs/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ BrowserType.connect(wsEndpoint, options);
- `setHeaders` [Map]&lt;[String], [String]&gt; *(optional)* <font size="2">Added in: v1.11</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-headers"/><a href="#browser-type-connect-option-headers" class="list-anchor">#</a>

Additional HTTP headers to be sent with web socket connect request. Optional.
- `setProxy` Proxy *(optional)* <font size="2">Added in: v1.52</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-proxy"/><a href="#browser-type-connect-option-proxy" class="list-anchor">#</a>
- `setServer` [String]

Proxy to be used for the remote connection. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
- `setBypass` [String] *(optional)*

Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
- `setUsername` [String] *(optional)*

Optional username to use if HTTP proxy requires authentication.
- `setPassword` [String] *(optional)*

Optional password to use if HTTP proxy requires authentication.

Proxy settings to use for the connection between the client and the remote browser. Note this proxy **is not** used by the browser to load web pages.
- `setSlowMo` [double] *(optional)* <font size="2">Added in: v1.10</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-option-slow-mo"/><a href="#browser-type-connect-option-slow-mo" class="list-anchor">#</a>

Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0.
Expand Down Expand Up @@ -115,6 +130,21 @@ Page page = defaultContext.pages().get(0);
- `setHeaders` [Map]&lt;[String], [String]&gt; *(optional)* <font size="2">Added in: v1.11</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-headers"/><a href="#browser-type-connect-over-cdp-option-headers" class="list-anchor">#</a>

Additional HTTP headers to be sent with connect request. Optional.
- `setProxy` Proxy *(optional)* <font size="2">Added in: v1.52</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-proxy"/><a href="#browser-type-connect-over-cdp-option-proxy" class="list-anchor">#</a>
- `setServer` [String]

Proxy to be used for the remote connection. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
- `setBypass` [String] *(optional)*

Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
- `setUsername` [String] *(optional)*

Optional username to use if HTTP proxy requires authentication.
- `setPassword` [String] *(optional)*

Optional password to use if HTTP proxy requires authentication.

Proxy settings to use for the connection between the client and the remote browser. Note this proxy **is not** used by the browser to load web pages.
- `setSlowMo` [double] *(optional)* <font size="2">Added in: v1.11</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-type-connect-over-cdp-option-slow-mo"/><a href="#browser-type-connect-over-cdp-option-slow-mo" class="list-anchor">#</a>

Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0.
Expand Down
2 changes: 1 addition & 1 deletion java/docs/pom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import HTMLCard from '@site/src/components/HTMLCard';

## Introduction

Large test suites can be structured to optimize ease of authoring and maintenance. Page object models are one such approach to structure your test suite.
Large test suites can be structured to optimize ease of authoring and maintenance. Page object models are one such approach to structure your test suite.

A page object represents a part of your web application. An e-commerce web application might have a home page, a listings page and a checkout page. Each of them can be represented by page object models.

Expand Down
7 changes: 3 additions & 4 deletions nodejs/docs/accessibility-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ type AxeFixture = {
// This new "test" can be used in multiple test files, and each of them will get
// a consistently configured AxeBuilder instance.
export const test = base.extend<AxeFixture>({
makeAxeBuilder: async ({ page }, use, testInfo) => {
makeAxeBuilder: async ({ page }, use) => {
const makeAxeBuilder = () => new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'])
.exclude('#commonly-reused-element-with-known-issue');
Expand All @@ -289,8 +289,7 @@ export { expect } from '@playwright/test';
</TabItem>
<TabItem value="js">

```js
// axe-test.js
```js title="axe-test.js"
const base = require('@playwright/test');
const AxeBuilder = require('@axe-core/playwright').default;

Expand All @@ -299,7 +298,7 @@ const AxeBuilder = require('@axe-core/playwright').default;
// This new "test" can be used in multiple test files, and each of them will get
// a consistently configured AxeBuilder instance.
exports.test = base.test.extend({
makeAxeBuilder: async ({ page }, use, testInfo) => {
makeAxeBuilder: async ({ page }, use) => {
const makeAxeBuilder = () => new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'])
.exclude('#commonly-reused-element-with-known-issue');
Expand Down
2 changes: 1 addition & 1 deletion nodejs/docs/api-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ test('last created issue should be on the server', async ({ page }) => {
await page.getByRole('textbox', { name: 'Title' }).fill('Bug report 1');
await page.getByRole('textbox', { name: 'Comment body' }).fill('Bug description');
await page.getByText('Submit new issue').click();
const issueId = page.url().substr(page.url().lastIndexOf('/'));
const issueId = new URL(page.url()).pathname.split('/').pop();

const newIssue = await apiContext.get(
`https://api.github.com/repos/${USER}/${REPO}/issues/${issueId}`
Expand Down
6 changes: 0 additions & 6 deletions nodejs/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -861,12 +861,6 @@ await browserContext.storageState(options);
- `indexedDB` [boolean] *(optional)* <font size="2">Added in: v1.51</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-storage-state-option-indexed-db"/><a href="#browser-context-storage-state-option-indexed-db" class="list-anchor">#</a>

Set to `true` to include [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) in the storage state snapshot. If your application uses IndexedDB to store authentication tokens, like Firebase Authentication, enable this.

:::note

IndexedDBs with typed arrays are currently not supported.
:::

- `path` [string] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-context-storage-state-option-path"/><a href="#browser-context-storage-state-option-path" class="list-anchor">#</a>

The file path to save the storage state to. If [path](/api/class-browsercontext.mdx#browser-context-storage-state-option-path) is a relative path, then it is resolved relative to current working directory. If no path is provided, storage state is still returned, but won't be saved to the disk.
Expand Down
Loading
Loading