diff --git a/.github/workflows/cherry_pick_into_release_branch.yml b/.github/workflows/cherry_pick_into_release_branch.yml deleted file mode 100644 index b0f635a69b199..0000000000000 --- a/.github/workflows/cherry_pick_into_release_branch.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: Cherry-pick into release branch - -on: - workflow_dispatch: - inputs: - version: - type: string - description: Version number, e.g. 1.25 - required: true - commit_hashes: - type: string - description: Comma-separated list of commit hashes to cherry-pick - required: true - -permissions: - contents: write - -jobs: - roll: - runs-on: ubuntu-22.04 - steps: - - name: Validate input version number - run: | - VERSION="${{ github.event.inputs.version }}" - if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+$ ]]; then - echo "Version is not a two digit semver version" - exit 1 - fi - - uses: actions/checkout@v4 - with: - ref: release-${{ github.event.inputs.version }} - fetch-depth: 0 - - name: Cherry-pick commits - id: cherry-pick - run: | - git config --global user.name microsoft-playwright-automation[bot] - git config --global user.email 203992400+microsoft-playwright-automation[bot]@users.noreply.github.com - for COMMIT_HASH in $(echo "${{ github.event.inputs.commit_hashes }}" | tr "," "\n"); do - git cherry-pick --no-commit "$COMMIT_HASH" - - COMMIT_MESSAGE="$(git show -s --format=%B $COMMIT_HASH | head -n 1)" - COMMIT_MESSAGE=$(node -e ' - const match = /^(.*) (\(#\d+\))$/.exec(process.argv[1]); - if (!match) { - console.log(process.argv[1]); - process.exit(0); - } - console.log(`cherry-pick${match[2]}: ${match[1]}`); - ' "$COMMIT_MESSAGE") - - git commit -m "$COMMIT_MESSAGE" - done - LAST_COMMIT_MESSAGE=$(git show -s --format=%B) - echo "PR_TITLE=$LAST_COMMIT_MESSAGE" >> $GITHUB_OUTPUT - - name: Prepare branch - id: prepare-branch - run: | - BRANCH_NAME="cherry-pick-${{ github.event.inputs.version }}-$(date +%Y-%m-%d-%H-%M-%S)" - echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT - git checkout -b "$BRANCH_NAME" - git push origin $BRANCH_NAME - - uses: actions/create-github-app-token@v2 - 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 - with: - github-token: ${{ steps.app-token.outputs.token }} - script: | - const readableCommitHashesList = '${{ github.event.inputs.commit_hashes }}'.split(',').map(hash => `- ${hash}`).join('\n'); - const response = await github.rest.pulls.create({ - owner: 'microsoft', - repo: 'playwright', - head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}', - base: 'release-${{ github.event.inputs.version }}', - title: '${{ steps.cherry-pick.outputs.PR_TITLE }}', - body: `This PR cherry-picks the following commits:\n\n${readableCommitHashesList}`, - }); - await github.rest.issues.addLabels({ - owner: 'microsoft', - repo: 'playwright', - issue_number: response.data.number, - labels: ['CQ1'], - }); diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml deleted file mode 100644 index 54cf652ae21b6..0000000000000 --- a/.github/workflows/copilot-setup-steps.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: "Copilot Setup Steps" -on: workflow_dispatch -jobs: - copilot-setup-steps: - runs-on: ubuntu-latest - - permissions: - contents: read - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "22" - - run: npm ci - - run: npm run build - - run: npx playwright install --with-deps diff --git a/.github/workflows/create_test_report.yml b/.github/workflows/create_test_report.yml deleted file mode 100644 index 6758556deff7e..0000000000000 --- a/.github/workflows/create_test_report.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Publish Test Results -on: - workflow_run: - workflows: ["tests 1", "tests 2", "tests others"] - types: - - completed -jobs: - merge-reports: - permissions: - pull-requests: write - checks: write - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - if: ${{ github.event.workflow_run.event == 'pull_request' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - run: npm ci - env: - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - - run: npm run build - - - name: Download blob report artifact - uses: ./.github/actions/download-artifact - with: - namePrefix: 'blob-report' - path: 'all-blob-reports' - - - name: Merge reports - run: | - npx playwright merge-reports --config .github/workflows/merge.config.ts ./all-blob-reports - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NODE_OPTIONS: --max-old-space-size=8192 - HTML_REPORT_URL: 'https://mspwblobreport.z1.web.core.windows.net/run-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}-${{ github.sha }}/index.html' - - - name: Azure Login - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZURE_BLOB_REPORTS_CLIENT_ID }} - tenant-id: ${{ secrets.AZURE_BLOB_REPORTS_TENANT_ID }} - subscription-id: ${{ secrets.AZURE_BLOB_REPORTS_SUBSCRIPTION_ID }} - - - name: Upload HTML report to Azure - run: | - REPORT_DIR='run-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}-${{ github.sha }}' - azcopy cp --recursive "./playwright-report/*" "https://mspwblobreport.blob.core.windows.net/\$web/$REPORT_DIR" - echo "Report url: https://mspwblobreport.z1.web.core.windows.net/$REPORT_DIR/index.html" - env: - AZCOPY_AUTO_LOGIN_TYPE: AZCLI diff --git a/.github/workflows/infra.yml b/.github/workflows/infra.yml deleted file mode 100644 index 0a03f10f1338a..0000000000000 --- a/.github/workflows/infra.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: "infra" - -on: - push: - branches: - - main - - release-* - pull_request: - branches: - - main - - release-* - -env: - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - doc-and-lint: - name: "docs & lint" - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - run: npm ci - - run: npm run build - - run: npx playwright install --with-deps - - run: npm run lint - - name: Verify clean tree - run: | - if [[ -n $(git status -s) ]]; then - echo "ERROR: tree is dirty after npm run build:" - git diff - exit 1 - fi - - name: Audit prod NPM dependencies - run: node utils/check_audit.js - continue-on-error: true - lint-snippets: - name: "Lint snippets" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '21' - - run: npm ci - - run: pip install -r utils/doclint/linting-code-snippets/python/requirements.txt - - run: mvn package - working-directory: utils/doclint/linting-code-snippets/java - - run: node utils/doclint/linting-code-snippets/cli.js diff --git a/.github/workflows/merge.config.ts b/.github/workflows/merge.config.ts deleted file mode 100644 index 222b728f7c134..0000000000000 --- a/.github/workflows/merge.config.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - testDir: '../../tests', - reporter: [[require.resolve('../../tests/config/ghaMarkdownReporter')], ['html']] -}; \ No newline at end of file diff --git a/.github/workflows/pr_check_client_side_changes.yml b/.github/workflows/pr_check_client_side_changes.yml deleted file mode 100644 index 12b7e5dff9131..0000000000000 --- a/.github/workflows/pr_check_client_side_changes.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: "Check client side changes" -on: - push: - branches: - - main - paths: - - 'docs/src/api/**/*' - - 'packages/playwright-core/src/client/**/*' - - 'packages/playwright-core/src/utils/isomorphic/**/*' - - 'packages/playwright/src/matchers/matchers.ts' - - 'packages/protocol/src/protocol.yml' -jobs: - check: - name: Check - runs-on: ubuntu-24.04 - if: github.repository == 'microsoft/playwright' - steps: - - uses: actions/checkout@v4 - - uses: actions/create-github-app-token@v2 - id: app-token - with: - app-id: ${{ vars.PLAYWRIGHT_APP_ID }} - private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }} - repositories: | - playwright - playwright-python - playwright-java - playwright-dotnet - - name: Create GitHub issue - uses: actions/github-script@v7 - with: - github-token: ${{ steps.app-token.outputs.token }} - script: | - const currentPlaywrightVersion = require('./package.json').version.match(/\d+\.\d+/)[0]; - const { data } = await github.rest.git.getCommit({ - owner: context.repo.owner, - repo: context.repo.repo, - commit_sha: context.sha, - }); - const commitHeader = data.message.split('\n')[0]; - const prMatch = commitHeader.match(/#(\d+)/); - const formattedCommit = prMatch - ? `https://github.com/microsoft/playwright/pull/${prMatch[1]}` - : `https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${context.sha} (${commitHeader})`; - - const title = '[Ports]: Backport client side changes for ' + currentPlaywrightVersion; - for (const repo of ['playwright-python', 'playwright-java', 'playwright-dotnet']) { - const { data: issuesData } = await github.rest.search.issuesAndPullRequests({ - q: `is:issue is:open repo:microsoft/${repo} in:title "${title}"` - }) - let issueNumber = null; - let issueBody = ''; - if (issuesData.total_count > 0) { - issueNumber = issuesData.items[0].number - issueBody = issuesData.items[0].body - } else { - const { data: issueCreateData } = await github.rest.issues.create({ - owner: context.repo.owner, - repo: repo, - title, - body: 'Please backport client side changes: \n', - }); - issueNumber = issueCreateData.number; - issueBody = issueCreateData.body; - } - const newBody = issueBody.trimEnd() + ` - - [ ] ${formattedCommit}`; - const data = await github.rest.issues.update({ - owner: context.repo.owner, - repo: repo, - issue_number: issueNumber, - body: newBody - }) - } diff --git a/.github/workflows/publish_canary.yml b/.github/workflows/publish_canary.yml deleted file mode 100644 index 02fa075ba7616..0000000000000 --- a/.github/workflows/publish_canary.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: "publish canary" - -on: - workflow_dispatch: - schedule: - - cron: "10 0 * * *" - push: - branches: - - release-* - -env: - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - publish-canary: - name: "publish canary NPM" - runs-on: ubuntu-24.04 - if: github.repository == 'microsoft/playwright' - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - environment: allow-publish-driver-to-cdn # This is required for OIDC login (azure/login) - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm run build - - name: "@next: publish with commit timestamp (triggered manually)" - if: contains(github.ref, 'main') && github.event_name == 'workflow_dispatch' - run: | - node utils/build/update_canary_version.js --alpha --commit-timestamp - utils/publish_all_packages.sh --alpha - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: "@next: publish with today's date (triggered automatically)" - if: contains(github.ref, 'main') && github.event_name != 'workflow_dispatch' - run: | - node utils/build/update_canary_version.js --alpha --today-date - utils/publish_all_packages.sh --alpha - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: "@beta: publish with commit timestamp (triggered automatically)" - if: contains(github.ref, 'release') && github.event_name != 'workflow_dispatch' - run: | - node utils/build/update_canary_version.js --beta --commit-timestamp - utils/publish_all_packages.sh --beta - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Azure Login - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZURE_PW_CDN_CLIENT_ID }} - tenant-id: ${{ secrets.AZURE_PW_CDN_TENANT_ID }} - subscription-id: ${{ secrets.AZURE_PW_CDN_SUBSCRIPTION_ID }} - - name: build & publish driver - env: - AZ_UPLOAD_FOLDER: driver/next - run: | - utils/build/build-playwright-driver.sh - utils/build/upload-playwright-driver.sh - - publish-trace-viewer: - name: "publish Trace Viewer to trace.playwright.dev" - runs-on: ubuntu-24.04 - if: github.repository == 'microsoft/playwright' - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - uses: actions/create-github-app-token@v2 - id: app-token - with: - app-id: ${{ vars.PLAYWRIGHT_APP_ID }} - private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }} - repositories: trace.playwright.dev - - name: Deploy Canary - run: bash utils/build/deploy-trace-viewer.sh --canary - if: contains(github.ref, 'main') - env: - GH_SERVICE_ACCOUNT_TOKEN: ${{ steps.app-token.outputs.token }} - - name: Deploy BETA - run: bash utils/build/deploy-trace-viewer.sh --beta - if: contains(github.ref, 'release') - env: - GH_SERVICE_ACCOUNT_TOKEN: ${{ steps.app-token.outputs.token }} diff --git a/.github/workflows/publish_release_docker.yml b/.github/workflows/publish_release_docker.yml deleted file mode 100644 index c9603bffcdf21..0000000000000 --- a/.github/workflows/publish_release_docker.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: "publish release - Docker" - -on: - workflow_dispatch: - release: - types: [published] - -env: - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - publish-docker-release: - name: "publish to DockerHub" - runs-on: ubuntu-22.04 - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - if: github.repository == 'microsoft/playwright' - environment: allow-publishing-docker-to-acr - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - registry-url: 'https://registry.npmjs.org' - - name: Set up Docker QEMU for arm64 docker builds - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - run: npm ci - - run: npm run build - - name: Azure Login - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZURE_DOCKER_CLIENT_ID }} - tenant-id: ${{ secrets.AZURE_DOCKER_TENANT_ID }} - subscription-id: ${{ secrets.AZURE_DOCKER_SUBSCRIPTION_ID }} - - name: Login to ACR via OIDC - run: az acr login --name playwright - - run: ./utils/docker/publish_docker.sh stable diff --git a/.github/workflows/publish_release_driver.yml b/.github/workflows/publish_release_driver.yml deleted file mode 100644 index 328deaf01cb7a..0000000000000 --- a/.github/workflows/publish_release_driver.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: "publish release - driver" - -on: - release: - types: [published] - -env: - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - publish-driver-release: - name: "publish playwright driver to CDN" - runs-on: ubuntu-24.04 - if: github.repository == 'microsoft/playwright' - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - environment: allow-publish-driver-to-cdn # This is required for OIDC login (azure/login) - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm run build - - run: utils/build/build-playwright-driver.sh - - name: Azure Login - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZURE_PW_CDN_CLIENT_ID }} - tenant-id: ${{ secrets.AZURE_PW_CDN_TENANT_ID }} - subscription-id: ${{ secrets.AZURE_PW_CDN_SUBSCRIPTION_ID }} - - run: utils/build/upload-playwright-driver.sh - env: - AZ_UPLOAD_FOLDER: driver diff --git a/.github/workflows/publish_release_npm.yml b/.github/workflows/publish_release_npm.yml deleted file mode 100644 index cab5e13596467..0000000000000 --- a/.github/workflows/publish_release_npm.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: "publish release - NPM" - -on: - release: - types: [published] - -env: - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - publish-npm-release: - name: "publish to NPM" - runs-on: ubuntu-24.04 - if: github.repository == 'microsoft/playwright' - permissions: - contents: read - id-token: write - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm run build - - run: utils/publish_all_packages.sh --release-candidate - if: ${{ github.event.release.prerelease }} - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - run: utils/publish_all_packages.sh --release - if: ${{ !github.event.release.prerelease }} - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish_release_traceviewer.yml b/.github/workflows/publish_release_traceviewer.yml deleted file mode 100644 index b497f5290cdcc..0000000000000 --- a/.github/workflows/publish_release_traceviewer.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: "publish release - TraceViewer" - -on: - release: - types: [published] - -jobs: - publish-trace-viewer: - name: "publish Trace Viewer to trace.playwright.dev" - runs-on: ubuntu-24.04 - if: github.repository == 'microsoft/playwright' - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - uses: actions/create-github-app-token@v2 - id: app-token - with: - app-id: ${{ vars.PLAYWRIGHT_APP_ID }} - private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }} - repositories: trace.playwright.dev - - name: Deploy Stable - run: bash utils/build/deploy-trace-viewer.sh --stable - env: - GH_SERVICE_ACCOUNT_TOKEN: ${{ steps.app-token.outputs.token }} diff --git a/.github/workflows/roll_browser_into_playwright.yml b/.github/workflows/roll_browser_into_playwright.yml deleted file mode 100644 index 3dc822638e361..0000000000000 --- a/.github/workflows/roll_browser_into_playwright.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Roll Browser into Playwright - -on: - repository_dispatch: - types: [roll_into_pw] - -env: - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - BROWSER: ${{ github.event.client_payload.browser }} - REVISION: ${{ github.event.client_payload.revision }} - -permissions: - contents: write - -concurrency: - group: 'roll-browser-into-playwright-${{ github.event.client_payload.browser }}-${{ github.event.client_payload.revision }}' - -jobs: - roll: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - run: npm ci - - run: npm run build - - name: Install dependencies - run: npx playwright install-deps - - name: Roll to new revision - run: | - ./utils/roll_browser.js $BROWSER $REVISION - npm run build - - name: Prepare branch - id: prepare-branch - run: | - BRANCH_NAME="roll-into-pw-${BROWSER}/${REVISION}" - echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT - - git fetch origin $BRANCH_NAME:$BRANCH_NAME || true - if git show-ref --verify --quiet refs/heads/$BRANCH_NAME; then - echo "exists=1" >> $GITHUB_OUTPUT - echo "branch $BRANCH_NAME already exists, exiting" - exit 0 - fi - echo "exists=0" >> $GITHUB_OUTPUT - - git config --global user.name microsoft-playwright-automation[bot] - git config --global user.email 203992400+microsoft-playwright-automation[bot]@users.noreply.github.com - git checkout -b "$BRANCH_NAME" - git add . - git commit -m "feat(${BROWSER}): roll to r${REVISION}" - git push origin $BRANCH_NAME --force - - uses: actions/create-github-app-token@v2 - 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.exists == '0' }} - with: - github-token: ${{ steps.app-token.outputs.token }} - script: | - const response = await github.rest.pulls.create({ - owner: 'microsoft', - repo: 'playwright', - head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}', - base: 'main', - title: 'feat(${{ env.BROWSER }}): roll to r${{ env.REVISION }}', - }); - await github.rest.issues.addLabels({ - owner: 'microsoft', - repo: 'playwright', - issue_number: response.data.number, - labels: ['CQ1'], - }); diff --git a/.github/workflows/roll_driver_nodejs.yml b/.github/workflows/roll_driver_nodejs.yml deleted file mode 100644 index ee993f980f12d..0000000000000 --- a/.github/workflows/roll_driver_nodejs.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: "PR: bump driver Node.js" -on: - workflow_dispatch: - schedule: - # At 10:00am UTC (3AM PST) every tuesday and thursday to roll to new Node.js driver - - cron: "0 10 * * 2,4" -jobs: - trigger-nodejs-roll: - name: Trigger Roll - runs-on: ubuntu-22.04 - if: github.repository == 'microsoft/playwright' - permissions: - contents: write - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - run: node utils/build/update-playwright-driver-version.mjs - - name: Prepare branch - id: prepare-branch - run: | - if [[ "$(git status --porcelain)" == "" ]]; then - echo "there are no changes"; - exit 0; - fi - echo "HAS_CHANGES=1" >> $GITHUB_OUTPUT - BRANCH_NAME="roll-driver-nodejs/$(date +%Y-%b-%d)" - echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT - git config --global user.name microsoft-playwright-automation[bot] - git config --global user.email 203992400+microsoft-playwright-automation[bot]@users.noreply.github.com - git checkout -b "$BRANCH_NAME" - git add . - git commit -m "chore(driver): roll driver to recent Node.js LTS version" - git push origin $BRANCH_NAME - - uses: actions/create-github-app-token@v2 - id: app-token - with: - app-id: ${{ vars.PLAYWRIGHT_APP_ID }} - private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }} - - name: Create Pull Request - if: ${{ steps.prepare-branch.outputs.HAS_CHANGES == '1' }} - uses: actions/github-script@v7 - with: - github-token: ${{ steps.app-token.outputs.token }} - script: | - await github.rest.pulls.create({ - owner: 'microsoft', - repo: 'playwright', - head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}', - base: 'main', - title: 'chore(driver): roll driver to recent Node.js LTS version', - }); diff --git a/.github/workflows/roll_stable_test_runner.yml b/.github/workflows/roll_stable_test_runner.yml deleted file mode 100644 index 2c908520444d8..0000000000000 --- a/.github/workflows/roll_stable_test_runner.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: "PR: bump stable-test-runner" -on: - workflow_dispatch: - schedule: - # At 10:00am UTC (3AM PST) every Monday - - cron: "0 10 * * 1" -jobs: - trigger-roll: - name: Trigger Roll - runs-on: ubuntu-24.04 - if: github.repository == 'microsoft/playwright' - permissions: - contents: write - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 22 - - run: | - npm install @playwright/test@next - VERSION=$(node -e "console.log(require('./package.json').dependencies['@playwright/test'].replace('^', ''))") - echo "VERSION=$VERSION" >> $GITHUB_OUTPUT - working-directory: tests/playwright-test/stable-test-runner/ - id: bump - - name: Prepare branch - id: prepare-branch - run: | - if [[ "$(git status --porcelain)" == "" ]]; then - echo "there are no changes"; - exit 0; - fi - echo "HAS_CHANGES=1" >> $GITHUB_OUTPUT - BRANCH_NAME="roll-stable-test-runner/$(date +%Y-%b-%d)" - echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT - git config --global user.name microsoft-playwright-automation[bot] - git config --global user.email 203992400+microsoft-playwright-automation[bot]@users.noreply.github.com - git checkout -b "$BRANCH_NAME" - git add . - git commit -m "test: roll stable-test-runner to ${{ steps.bump.outputs.VERSION }}" - git push origin $BRANCH_NAME - - uses: actions/create-github-app-token@v2 - id: app-token - with: - app-id: ${{ vars.PLAYWRIGHT_APP_ID }} - private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }} - - name: Create Pull Request - if: ${{ steps.prepare-branch.outputs.HAS_CHANGES == '1' }} - uses: actions/github-script@v7 - with: - github-token: ${{ steps.app-token.outputs.token }} - script: | - await github.rest.pulls.create({ - owner: 'microsoft', - repo: 'playwright', - head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}', - base: 'main', - title: 'test: roll stable-test-runner to ${{ steps.bump.outputs.VERSION }}', - }); diff --git a/.github/workflows/tests_bidi.yml b/.github/workflows/tests_bidi.yml deleted file mode 100644 index 22231f1126cb0..0000000000000 --- a/.github/workflows/tests_bidi.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: tests BiDi - -on: - workflow_dispatch: - inputs: - ref: - description: Playwright SHA / ref to test. Use 'refs/pull/PULL_REQUEST_ID/head' to test a PR. Defaults to the current branch. - required: false - default: '' - pull_request: - branches: - - main - paths: - - .github/workflows/tests_bidi.yml - - packages/playwright-core/src/server/bidi/** - - tests/bidi/** - schedule: - # Run every day at midnight - - cron: '0 0 * * *' - -env: - FORCE_COLOR: 1 - -jobs: - test_bidi: - name: BiDi - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ubuntu-24.04 - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - strategy: - fail-fast: false - matrix: - channel: [bidi-chromium, moz-firefox] - steps: - - uses: actions/checkout@v4 - if: github.event_name != 'workflow_dispatch' - - uses: actions/checkout@v4 - if: github.event_name == 'workflow_dispatch' - with: - ref: ${{ github.event.inputs.ref }} - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm ci - - run: npm run build - - run: npx playwright install --with-deps chromium - if: matrix.channel == 'bidi-chromium' - - if: matrix.channel == 'moz-firefox' - id: install_firefox - run: | - npx -y @puppeteer/browsers install firefox@nightly |\ - awk 'END { $1=""; sub(/^ /,""); print "bidi_ffpath="$0 }' |\ - tee -a $GITHUB_OUTPUT - - name: Run tests - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run biditest -- --project=${{ matrix.channel }}* - env: - PWTEST_USE_BIDI_EXPECTATIONS: '1' - BIDI_FFPATH: ${{ steps.install_firefox.outputs.bidi_ffpath }} - - name: Upload csv report to GitHub - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: csv-report-${{ matrix.channel }} - path: test-results/report.csv - retention-days: 7 - - - name: Azure Login - if: ${{ !cancelled() && github.ref == 'refs/heads/main' }} - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZURE_BLOB_REPORTS_CLIENT_ID }} - tenant-id: ${{ secrets.AZURE_BLOB_REPORTS_TENANT_ID }} - subscription-id: ${{ secrets.AZURE_BLOB_REPORTS_SUBSCRIPTION_ID }} - - - name: Upload report.csv to Azure - if: ${{ !cancelled() && github.ref == 'refs/heads/main' }} - run: | - REPORT_DIR='bidi-reports' - azcopy cp "./test-results/report.csv" "https://mspwblobreport.blob.core.windows.net/\$web/$REPORT_DIR/${{ matrix.channel }}.csv" - echo "Report url: https://mspwblobreport.z1.web.core.windows.net/$REPORT_DIR/${{ matrix.channel }}.csv" - env: - AZCOPY_AUTO_LOGIN_TYPE: AZCLI diff --git a/.github/workflows/tests_components.yml b/.github/workflows/tests_components.yml deleted file mode 100644 index 093d5de0c406d..0000000000000 --- a/.github/workflows/tests_components.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: "components" - -on: - push: - branches: - - main - - release-* - pull_request: - paths-ignore: - - 'browser_patches/**' - - 'docs/**' - branches: - - main - - release-* - -env: - FORCE_COLOR: 1 - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - test_components: - name: ${{ matrix.os }} - Node.js ${{ matrix.node-version }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - node-version: [18] - include: - - os: ubuntu-latest - node-version: 20 - - os: ubuntu-latest - node-version: 22 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build - - run: npx playwright install --with-deps - - run: npm run ct diff --git a/.github/workflows/tests_others.yml b/.github/workflows/tests_others.yml deleted file mode 100644 index b35a61d3b234d..0000000000000 --- a/.github/workflows/tests_others.yml +++ /dev/null @@ -1,187 +0,0 @@ -name: tests others - -on: - push: - branches: - - main - - release-* - pull_request: - paths-ignore: - - 'browser_patches/**' - - 'docs/**' - types: [ labeled ] - branches: - - main - - release-* - -env: - FORCE_COLOR: 1 - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - test_stress: - name: Stress - ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm ci - - run: npm run build - - run: npx playwright install --with-deps - - run: npm run stest contexts -- --project=chromium - if: ${{ !cancelled() }} - - run: npm run stest browsers -- --project=chromium - if: ${{ !cancelled() }} - - run: npm run stest frames -- --project=chromium - if: ${{ !cancelled() }} - - run: npm run stest contexts -- --project=webkit - if: ${{ !cancelled() }} - - run: npm run stest browsers -- --project=webkit - if: ${{ !cancelled() }} - - run: npm run stest frames -- --project=webkit - if: ${{ !cancelled() }} - - run: npm run stest contexts -- --project=firefox - if: ${{ !cancelled() }} - - run: npm run stest browsers -- --project=firefox - if: ${{ !cancelled() }} - - run: npm run stest frames -- --project=firefox - if: ${{ !cancelled() }} - - run: npm run stest heap -- --project=chromium - if: ${{ !cancelled() }} - - test_webview2: - name: WebView2 - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: windows-2022 - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' - - run: dotnet build - working-directory: tests/webview2/webview2-app/ - - name: Update to Evergreen WebView2 Runtime - shell: pwsh - run: | - # See here: https://developer.microsoft.com/en-us/microsoft-edge/webview2/ - Invoke-WebRequest -Uri 'https://go.microsoft.com/fwlink/p/?LinkId=2124703' -OutFile 'setup.exe' - Start-Process -FilePath setup.exe -Verb RunAs -Wait - - uses: ./.github/actions/run-test - with: - node-version: 20 - browsers-to-install: chromium - command: npm run webview2test - bot-name: "webview2-chromium-windows" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - - test_clock_frozen_time_linux: - name: time library - ${{ matrix.clock }} - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - strategy: - fail-fast: false - matrix: - clock: [frozen, realtime] - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - node-version: 20 - browsers-to-install: chromium - command: npm run test -- --project=chromium-* - bot-name: "${{ matrix.clock }}-time-library-chromium-linux" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - env: - PW_CLOCK: ${{ matrix.clock }} - - test_clock_frozen_time_test_runner: - name: time test runner - ${{ matrix.clock }} - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ubuntu-22.04 - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - strategy: - fail-fast: false - matrix: - clock: [frozen, realtime] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - node-version: 20 - command: npm run ttest - bot-name: "${{ matrix.clock }}-time-runner-chromium-linux" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - env: - PW_CLOCK: ${{ matrix.clock }} - - test_legacy_progress_timeouts: - name: legacy progress timeouts - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - node-version: 20 - browsers-to-install: chromium - command: npm run test -- --project=chromium-* - bot-name: "legacy-progress-timeouts-linux" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - env: - PLAYWRIGHT_LEGACY_TIMEOUTS: 1 - - test_electron: - name: Electron - ${{ matrix.os }} - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - name: Setup Ubuntu Binary Installation # TODO: Remove when https://github.com/electron/electron/issues/42510 is fixed - if: ${{ runner.os == 'Linux' }} - run: | - if grep -q "Ubuntu 24" /etc/os-release; then - sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 - fi - shell: bash - - uses: ./.github/actions/run-test - with: - browsers-to-install: chromium - command: npm run etest - bot-name: "electron-${{ matrix.os }}" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - env: - ELECTRON_SKIP_BINARY_DOWNLOAD: diff --git a/.github/workflows/tests_primary.yml b/.github/workflows/tests_primary.yml deleted file mode 100644 index ec575d808e798..0000000000000 --- a/.github/workflows/tests_primary.yml +++ /dev/null @@ -1,243 +0,0 @@ -name: "tests 1" - -on: - push: - branches: - - main - - release-* - pull_request: - paths-ignore: - - 'browser_patches/**' - - 'docs/**' - branches: - - main - - release-* - -concurrency: - # For pull requests, cancel all currently-running jobs for this workflow - # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -env: - # Force terminal colors. @see https://www.npmjs.com/package/colors - FORCE_COLOR: 1 - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - DEBUG_GIT_COMMIT_INFO: 1 - -jobs: - test_linux: - name: ${{ matrix.os }} (${{ matrix.browser }} - Node.js ${{ matrix.node-version }}) - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - browser: [chromium, firefox, webkit] - os: [ubuntu-22.04] - node-version: [18] - include: - - os: ubuntu-22.04 - node-version: 20 - browser: chromium - - os: ubuntu-22.04 - node-version: 22 - browser: chromium - - os: ubuntu-22.04 - node-version: 24 - browser: chromium - runs-on: ${{ matrix.os }} - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - node-version: ${{ matrix.node-version }} - browsers-to-install: ${{ matrix.browser }} chromium - command: npm run test -- --project=${{ matrix.browser }}-* - bot-name: "${{ matrix.browser }}-${{ matrix.os }}-node${{ matrix.node-version }}" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - - test_linux_chromium_tot: - name: ${{ matrix.os }} (chromium tip-of-tree) - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-22.04] - runs-on: ${{ matrix.os }} - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chromium-tip-of-tree - command: npm run test -- --project=chromium-* - bot-name: "${{ matrix.os }}-chromium-tip-of-tree" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - env: - PWTEST_CHANNEL: chromium-tip-of-tree - - test_test_runner: - name: Test Runner - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - node-version: [18] - shardIndex: [1, 2] - shardTotal: [2] - include: - - os: ubuntu-latest - node-version: 20 - shardIndex: 1 - shardTotal: 2 - - os: ubuntu-latest - node-version: 20 - shardIndex: 2 - shardTotal: 2 - - os: ubuntu-latest - node-version: 22 - shardIndex: 1 - shardTotal: 2 - - os: ubuntu-latest - node-version: 22 - shardIndex: 2 - shardTotal: 2 - - os: ubuntu-latest - node-version: 24 - shardIndex: 1 - shardTotal: 2 - - os: ubuntu-latest - node-version: 24 - shardIndex: 2 - shardTotal: 2 - runs-on: ${{ matrix.os }} - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - node-version: ${{matrix.node-version}} - command: npm run ttest -- --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }} - bot-name: "${{ matrix.os }}-node${{ matrix.node-version }}-${{ matrix.shardIndex }}" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - env: - PWTEST_CHANNEL: firefox-beta - - test_web_components: - name: Web Components - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - run: npm ci - - run: npm run build - - - run: npx playwright install --with-deps - - run: npm run test-html-reporter - env: - PWTEST_BOT_NAME: "web-components-html-reporter" - - name: Upload blob report - if: ${{ !cancelled() }} - uses: ./.github/actions/upload-blob-report - with: - report_dir: packages/html-reporter/blob-report - job_name: "web-components-html-reporter" - - - run: npm run test-web - if: ${{ !cancelled() }} - env: - PWTEST_BOT_NAME: "web-components-web" - - name: Upload blob report - if: ${{ !cancelled() }} - uses: ./.github/actions/upload-blob-report - with: - report_dir: packages/web/blob-report - job_name: "web-components-web" - - test_vscode_extension: - name: VSCode Extension - runs-on: ubuntu-latest - env: - PWTEST_BOT_NAME: "vscode-extension" - DEBUG_GIT_COMMIT_INFO: "" - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - run: npm ci - env: - DEBUG: pw:install - - run: npm run build - - run: npx playwright install chromium - - name: Checkout extension - run: git clone https://github.com/microsoft/playwright-vscode.git - - name: Print extension revision - run: git rev-parse HEAD - working-directory: ./playwright-vscode - - name: Remove @playwright/test from extension dependencies - run: node -e "const p = require('./package.json'); delete p.devDependencies['@playwright/test']; fs.writeFileSync('./package.json', JSON.stringify(p, null, 2));" - working-directory: ./playwright-vscode - - name: Build extension - run: npm ci && npm run build - working-directory: ./playwright-vscode - - name: Run extension tests - run: npm run test -- --workers=1 - working-directory: ./playwright-vscode - - name: Upload blob report - if: ${{ !cancelled() }} - uses: ./.github/actions/upload-blob-report - with: - report_dir: playwright-vscode/blob-report - job_name: ${{ env.PWTEST_BOT_NAME }} - - test_package_installations: - name: "Installation Test ${{ matrix.os }}" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - os: - - ubuntu-latest - - macos-latest - - windows-latest - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - steps: - - uses: actions/checkout@v4 - - run: npm install -g yarn@1 - - run: npm install -g pnpm@8 - - name: Setup Ubuntu Binary Installation # TODO: Remove when https://github.com/electron/electron/issues/42510 is fixed - if: ${{ runner.os == 'Linux' }} - run: | - if grep -q "Ubuntu 24" /etc/os-release; then - sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 - fi - shell: bash - - uses: ./.github/actions/run-test - with: - command: npm run itest - bot-name: "package-installations-${{ matrix.os }}" - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} diff --git a/.github/workflows/tests_secondary.yml b/.github/workflows/tests_secondary.yml index eafe68cd60f3e..2896227de40c5 100644 --- a/.github/workflows/tests_secondary.yml +++ b/.github/workflows/tests_secondary.yml @@ -9,7 +9,6 @@ on: paths-ignore: - 'browser_patches/**' - 'docs/**' - types: [ labeled ] branches: - main - release-* @@ -24,26 +23,6 @@ permissions: contents: read # This is required for actions/checkout to succeed jobs: - test_linux: - name: ${{ matrix.os }} (${{ matrix.browser }}) - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - browser: [chromium, firefox, webkit] - os: [ubuntu-24.04] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: ${{ matrix.browser }} chromium - command: npm run test -- --project=${{ matrix.browser }}-* - bot-name: "${{ matrix.browser }}-${{ matrix.os }}" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - test_mac: name: ${{ matrix.os }} (${{ matrix.browser }}) environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} @@ -52,16 +31,13 @@ jobs: matrix: # Intel: *-large # Arm64: *-xlarge - os: [macos-13-large, macos-13-xlarge, macos-14-large, macos-14-xlarge] - browser: [chromium, firefox, webkit] - include: - - os: macos-15-large - browser: webkit - - os: macos-15-xlarge - browser: webkit + os: [macos-14-large] + browser: [chromium] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 - uses: ./.github/actions/run-test with: browsers-to-install: ${{ matrix.browser }} chromium @@ -71,258 +47,4 @@ jobs: flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - test_win: - name: "Windows" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - browser: [chromium, firefox, webkit] - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: ${{ matrix.browser }} chromium - command: npm run test -- --project=${{ matrix.browser }}-* ${{ matrix.browser == 'firefox' && '--workers 1' || '' }} - bot-name: "${{ matrix.browser }}-windows-latest" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - - test-package-installations-other-node-versions: - name: "Installation Test ${{ matrix.os }} (${{ matrix.node_version }})" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - node_version: 20 - - os: ubuntu-latest - node_version: 22 - - os: ubuntu-latest - node_version: 24 - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - run: npm install -g yarn@1 - - run: npm install -g pnpm@8 - - name: Setup Ubuntu Binary Installation # TODO: Remove when https://github.com/electron/electron/issues/42510 is fixed - if: ${{ runner.os == 'Linux' }} - run: | - if grep -q "Ubuntu 24" /etc/os-release; then - sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 - fi - shell: bash - - uses: ./.github/actions/run-test - with: - node-version: ${{ matrix.node_version }} - command: npm run itest - bot-name: "package-installations-${{ matrix.os }}-node${{ matrix.node_version }}" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - - headed_tests: - name: "headed ${{ matrix.browser }} (${{ matrix.os }})" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - browser: [chromium, firefox, webkit] - os: [ubuntu-24.04, macos-14-xlarge, windows-latest] - include: - # We have different binaries per Ubuntu version for WebKit. - - browser: webkit - os: ubuntu-22.04 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: ${{ matrix.browser }} chromium - command: npm run test -- --project=${{ matrix.browser }}-* --headed - bot-name: "${{ matrix.browser }}-headed-${{ matrix.os }}" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - - transport_linux: - name: "Transport" - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - mode: [driver, service] - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chromium - command: npm run ctest - bot-name: "${{ matrix.mode }}" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - env: - PWTEST_MODE: ${{ matrix.mode }} - - tracing_linux: - name: Tracing ${{ matrix.browser }} ${{ matrix.channel }} - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - include: - - browser: chromium - runs-on: ubuntu-22.04 - - browser: firefox - runs-on: ubuntu-22.04 - # See https://github.com/microsoft/playwright/issues/35586 - - browser: webkit - runs-on: ubuntu-24.04 - - browser: chromium - runs-on: ubuntu-22.04 - channel: chromium-tip-of-tree - runs-on: ${{ matrix.runs-on }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: ${{ matrix.browser }} chromium ${{ matrix.channel }} - command: npm run test -- --project=${{ matrix.browser }}-* - bot-name: "tracing-${{ matrix.channel || matrix.browser }}" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - env: - PWTEST_TRACE: 1 - PWTEST_CHANNEL: ${{ matrix.channel }} - - test_chromium_channels: - name: Test ${{ matrix.channel }} on ${{ matrix.runs-on }} - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ${{ matrix.runs-on }} - strategy: - fail-fast: false - matrix: - channel: [chrome, chrome-beta, msedge, msedge-beta, msedge-dev] - runs-on: [ubuntu-22.04, macos-latest, windows-latest] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: ${{ matrix.channel }} - command: npm run ctest - bot-name: ${{ matrix.channel }}-${{ matrix.runs-on }} - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - env: - PWTEST_CHANNEL: ${{ matrix.channel }} - - chromium_tot: - name: Chromium tip-of-tree ${{ matrix.os }}${{ matrix.headed }} - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-22.04, macos-13, windows-latest] - headed: ['--headed', ''] - exclude: - # Tested in tests_primary.yml already - - os: ubuntu-22.04 - headed: '' - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chromium-tip-of-tree - command: npm run ctest -- ${{ matrix.headed }} - bot-name: "chromium-tip-of-tree-${{ matrix.os }}${{ matrix.headed }}" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - env: - PWTEST_CHANNEL: chromium-tip-of-tree - - chromium_tot_headless_shell: - name: Chromium tip-of-tree headless-shell-${{ matrix.os }} - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-22.04] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: chromium-tip-of-tree-headless-shell - command: npm run ctest - bot-name: "chromium-tip-of-tree-headless-shell-${{ matrix.os }}" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - env: - PWTEST_CHANNEL: chromium-tip-of-tree-headless-shell - - firefox_beta: - name: Firefox Beta ${{ matrix.os }} - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-22.04, windows-latest, macos-latest] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: firefox-beta chromium - command: npm run ftest - bot-name: "firefox-beta-${{ matrix.os }}" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - env: - PWTEST_CHANNEL: firefox-beta - - build-playwright-driver: - name: "build-playwright-driver" - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - run: npm ci - - run: npm run build - - run: utils/build/build-playwright-driver.sh - - test_channel_chromium: - name: Test channel=chromium - environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }} - strategy: - fail-fast: false - matrix: - runs-on: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.runs-on }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - # TODO: this should pass --no-shell. - # However, codegen tests do not inherit the channel and try to launch headless shell. - browsers-to-install: chromium - command: npm run ctest - bot-name: "channel-chromium-${{ matrix.runs-on }}" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - env: - PWTEST_CHANNEL: chromium + \ No newline at end of file diff --git a/.github/workflows/tests_video.yml b/.github/workflows/tests_video.yml deleted file mode 100644 index cc303d79c5aae..0000000000000 --- a/.github/workflows/tests_video.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: "tests Video" - -on: - push: - branches: - - main - - release-* - -env: - # Force terminal colors. @see https://www.npmjs.com/package/colors - FORCE_COLOR: 1 - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - -jobs: - video_linux: - name: "Video Linux" - environment: allow-uploading-flakiness-results - strategy: - fail-fast: false - matrix: - browser: [chromium, firefox, webkit] - os: [ubuntu-22.04, ubuntu-24.04] - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/run-test - with: - browsers-to-install: ${{ matrix.browser }} chromium - command: npm run test -- --project=${{ matrix.browser }}-* - bot-name: "${{ matrix.browser }}-${{ matrix.os }}" - flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} - flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} - flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} - env: - PWTEST_VIDEO: 1 diff --git a/.github/workflows/trigger_tests.yml b/.github/workflows/trigger_tests.yml deleted file mode 100644 index 69a3d5f21b4e7..0000000000000 --- a/.github/workflows/trigger_tests.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: "Internal Tests" - -on: - push: - branches: - - main - - release-* - -jobs: - trigger: - name: "trigger" - runs-on: ubuntu-24.04 - steps: - - uses: actions/create-github-app-token@v2 - id: app-token - with: - app-id: ${{ vars.PLAYWRIGHT_APP_ID }} - private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }} - repositories: playwright-browsers - - run: | - curl -X POST \ - -H "Accept: application/vnd.github.v3+json" \ - -H "Authorization: token ${GH_TOKEN}" \ - --data "{\"event_type\": \"playwright_tests\", \"client_payload\": {\"ref\": \"${GITHUB_SHA}\"}}" \ - https://api.github.com/repos/microsoft/playwright-browsers/dispatches - env: - GH_TOKEN: ${{ steps.app-token.outputs.token }} diff --git a/README.md b/README.md index 96ab31796073a..5b45e3af0ac67 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 🎭 Playwright -[![npm version](https://img.shields.io/npm/v/playwright.svg)](https://www.npmjs.com/package/playwright) [![Chromium version](https://img.shields.io/badge/chromium-138.0.7204.35-blue.svg?logo=google-chrome)](https://www.chromium.org/Home) [![Firefox version](https://img.shields.io/badge/firefox-139.0-blue.svg?logo=firefoxbrowser)](https://www.mozilla.org/en-US/firefox/new/) [![WebKit version](https://img.shields.io/badge/webkit-18.5-blue.svg?logo=safari)](https://webkit.org/) [![Join Discord](https://img.shields.io/badge/join-discord-informational)](https://aka.ms/playwright/discord) +[![npm version](https://img.shields.io/npm/v/playwright.svg)](https://www.npmjs.com/package/playwright) [![Chromium version](https://img.shields.io/badge/chromium-139.0.7258.5-blue.svg?logo=google-chrome)](https://www.chromium.org/Home) [![Firefox version](https://img.shields.io/badge/firefox-139.0-blue.svg?logo=firefoxbrowser)](https://www.mozilla.org/en-US/firefox/new/) [![WebKit version](https://img.shields.io/badge/webkit-18.5-blue.svg?logo=safari)](https://webkit.org/) [![Join Discord](https://img.shields.io/badge/join-discord-informational)](https://aka.ms/playwright/discord) ## [Documentation](https://playwright.dev) | [API reference](https://playwright.dev/docs/api/class-playwright) @@ -8,7 +8,7 @@ Playwright is a framework for Web Testing and Automation. It allows testing [Chr | | Linux | macOS | Windows | | :--- | :---: | :---: | :---: | -| Chromium 138.0.7204.35 | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Chromium 139.0.7258.5 | :white_check_mark: | :white_check_mark: | :white_check_mark: | | WebKit 18.5 | :white_check_mark: | :white_check_mark: | :white_check_mark: | | Firefox 139.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | diff --git a/packages/playwright-core/browsers.json b/packages/playwright-core/browsers.json index 34946105cf946..a9c41deabef75 100644 --- a/packages/playwright-core/browsers.json +++ b/packages/playwright-core/browsers.json @@ -3,15 +3,15 @@ "browsers": [ { "name": "chromium", - "revision": "1180", + "revision": "1181", "installByDefault": true, - "browserVersion": "138.0.7204.35" + "browserVersion": "139.0.7258.5" }, { "name": "chromium-headless-shell", - "revision": "1180", + "revision": "1181", "installByDefault": true, - "browserVersion": "138.0.7204.35" + "browserVersion": "139.0.7258.5" }, { "name": "chromium-tip-of-tree", diff --git a/packages/playwright-core/src/server/chromium/protocol.d.ts b/packages/playwright-core/src/server/chromium/protocol.d.ts index 8b3fa03f1b1af..1df8156c8ac39 100644 --- a/packages/playwright-core/src/server/chromium/protocol.d.ts +++ b/packages/playwright-core/src/server/chromium/protocol.d.ts @@ -3898,7 +3898,7 @@ front-end. /** * Pseudo element type. */ - export type PseudoType = "first-line"|"first-letter"|"checkmark"|"before"|"after"|"picker-icon"|"marker"|"backdrop"|"column"|"selection"|"search-text"|"target-text"|"spelling-error"|"grammar-error"|"highlight"|"first-line-inherited"|"scroll-marker"|"scroll-marker-group"|"scroll-button"|"scrollbar"|"scrollbar-thumb"|"scrollbar-button"|"scrollbar-track"|"scrollbar-track-piece"|"scrollbar-corner"|"resizer"|"input-list-button"|"view-transition"|"view-transition-group"|"view-transition-image-pair"|"view-transition-old"|"view-transition-new"|"placeholder"|"file-selector-button"|"details-content"|"picker"|"permission-icon"; + export type PseudoType = "first-line"|"first-letter"|"checkmark"|"before"|"after"|"picker-icon"|"marker"|"backdrop"|"column"|"selection"|"search-text"|"target-text"|"spelling-error"|"grammar-error"|"highlight"|"first-line-inherited"|"scroll-marker"|"scroll-marker-group"|"scroll-button"|"scrollbar"|"scrollbar-thumb"|"scrollbar-button"|"scrollbar-track"|"scrollbar-track-piece"|"scrollbar-corner"|"resizer"|"input-list-button"|"view-transition"|"view-transition-group"|"view-transition-image-pair"|"view-transition-group-children"|"view-transition-old"|"view-transition-new"|"placeholder"|"file-selector-button"|"details-content"|"picker"|"permission-icon"; /** * Shadow root type. */ @@ -6282,6 +6282,11 @@ Missing optional values will be filled in by the target with what it would norma mobile: boolean; bitness?: string; wow64?: boolean; + /** + * Used to specify User Agent form-factor values. +See https://wicg.github.io/ua-client-hints/#sec-ch-ua-form-factors + */ + formFactors?: string[]; } /** * Used to specify sensor types to emulate. @@ -6579,6 +6584,14 @@ physiologically accurate emulations for medically recognized color vision defici } export type setEmulatedVisionDeficiencyReturnValue = { } + /** + * Emulates the given OS text scale. + */ + export type setEmulatedOSTextScaleParameters = { + scale?: number; + } + export type setEmulatedOSTextScaleReturnValue = { + } /** * Overrides the Geolocation Position or Error. Omitting latitude, longitude or accuracy emulates position unavailable. @@ -9604,6 +9617,11 @@ https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges- * The outer response of signed HTTP exchange which was received from network. */ outerResponse: Response; + /** + * Whether network response for the signed exchange was accompanied by +extra headers. + */ + hasExtraInfo: boolean; /** * Information about the signed exchange header. */ @@ -12045,20 +12063,40 @@ Backend then generates 'inspectNodeRequested' event upon element selection. explanations?: AdFrameExplanation[]; } /** - * Identifies the bottom-most script which caused the frame to be labelled -as an ad. + * Identifies the script which caused a script or frame to be labelled as an +ad. */ export interface AdScriptId { /** - * Script Id of the bottom-most script which caused the frame to be labelled -as an ad. + * Script Id of the script which caused a script or frame to be labelled as +an ad. */ scriptId: Runtime.ScriptId; /** - * Id of adScriptId's debugger. + * Id of scriptId's debugger. */ debuggerId: Runtime.UniqueDebuggerId; } + /** + * Encapsulates the script ancestry and the root script filterlist rule that +caused the frame to be labelled as an ad. Only created when `ancestryChain` +is not empty. + */ + export interface AdScriptAncestry { + /** + * A chain of `AdScriptId`s representing the ancestry of an ad script that +led to the creation of a frame. The chain is ordered from the script +itself (lower level) up to its root ancestor that was flagged by +filterlist. + */ + ancestryChain: AdScriptId[]; + /** + * The filterlist rule that caused the root (last) script in +`ancestryChain` to be ad-tagged. Only populated if the rule is +available. + */ + rootScriptFilterlistRule?: string; + } /** * Indicates whether the frame is a secure context and why it is the case. */ @@ -12073,7 +12111,7 @@ as an ad. in services/network/public/cpp/permissions_policy/permissions_policy_features.json5. LINT.IfChange(PermissionsPolicyFeature) */ - export type PermissionsPolicyFeature = "accelerometer"|"all-screens-capture"|"ambient-light-sensor"|"attribution-reporting"|"autoplay"|"bluetooth"|"browsing-topics"|"camera"|"captured-surface-control"|"ch-dpr"|"ch-device-memory"|"ch-downlink"|"ch-ect"|"ch-prefers-color-scheme"|"ch-prefers-reduced-motion"|"ch-prefers-reduced-transparency"|"ch-rtt"|"ch-save-data"|"ch-ua"|"ch-ua-arch"|"ch-ua-bitness"|"ch-ua-high-entropy-values"|"ch-ua-platform"|"ch-ua-model"|"ch-ua-mobile"|"ch-ua-form-factors"|"ch-ua-full-version"|"ch-ua-full-version-list"|"ch-ua-platform-version"|"ch-ua-wow64"|"ch-viewport-height"|"ch-viewport-width"|"ch-width"|"clipboard-read"|"clipboard-write"|"compute-pressure"|"controlled-frame"|"cross-origin-isolated"|"deferred-fetch"|"deferred-fetch-minimal"|"device-attributes"|"digital-credentials-get"|"direct-sockets"|"direct-sockets-private"|"display-capture"|"document-domain"|"encrypted-media"|"execution-while-out-of-viewport"|"execution-while-not-rendered"|"fenced-unpartitioned-storage-read"|"focus-without-user-activation"|"fullscreen"|"frobulate"|"gamepad"|"geolocation"|"gyroscope"|"hid"|"identity-credentials-get"|"idle-detection"|"interest-cohort"|"join-ad-interest-group"|"keyboard-map"|"language-detector"|"local-fonts"|"local-network-access"|"magnetometer"|"media-playback-while-not-visible"|"microphone"|"midi"|"on-device-speech-recognition"|"otp-credentials"|"payment"|"picture-in-picture"|"popins"|"private-aggregation"|"private-state-token-issuance"|"private-state-token-redemption"|"publickey-credentials-create"|"publickey-credentials-get"|"record-ad-auction-events"|"rewriter"|"run-ad-auction"|"screen-wake-lock"|"serial"|"shared-autofill"|"shared-storage"|"shared-storage-select-url"|"smart-card"|"speaker-selection"|"storage-access"|"sub-apps"|"summarizer"|"sync-xhr"|"translator"|"unload"|"usb"|"usb-unrestricted"|"vertical-scroll"|"web-app-installation"|"web-printing"|"web-share"|"window-management"|"writer"|"xr-spatial-tracking"; + export type PermissionsPolicyFeature = "accelerometer"|"all-screens-capture"|"ambient-light-sensor"|"attribution-reporting"|"autoplay"|"bluetooth"|"browsing-topics"|"camera"|"captured-surface-control"|"ch-dpr"|"ch-device-memory"|"ch-downlink"|"ch-ect"|"ch-prefers-color-scheme"|"ch-prefers-reduced-motion"|"ch-prefers-reduced-transparency"|"ch-rtt"|"ch-save-data"|"ch-ua"|"ch-ua-arch"|"ch-ua-bitness"|"ch-ua-high-entropy-values"|"ch-ua-platform"|"ch-ua-model"|"ch-ua-mobile"|"ch-ua-form-factors"|"ch-ua-full-version"|"ch-ua-full-version-list"|"ch-ua-platform-version"|"ch-ua-wow64"|"ch-viewport-height"|"ch-viewport-width"|"ch-width"|"clipboard-read"|"clipboard-write"|"compute-pressure"|"controlled-frame"|"cross-origin-isolated"|"deferred-fetch"|"deferred-fetch-minimal"|"device-attributes"|"digital-credentials-get"|"direct-sockets"|"direct-sockets-private"|"display-capture"|"document-domain"|"encrypted-media"|"execution-while-out-of-viewport"|"execution-while-not-rendered"|"fenced-unpartitioned-storage-read"|"focus-without-user-activation"|"fullscreen"|"frobulate"|"gamepad"|"geolocation"|"gyroscope"|"hid"|"identity-credentials-get"|"idle-detection"|"interest-cohort"|"join-ad-interest-group"|"keyboard-map"|"language-detector"|"language-model"|"local-fonts"|"local-network-access"|"magnetometer"|"media-playback-while-not-visible"|"microphone"|"midi"|"on-device-speech-recognition"|"otp-credentials"|"payment"|"picture-in-picture"|"popins"|"private-aggregation"|"private-state-token-issuance"|"private-state-token-redemption"|"publickey-credentials-create"|"publickey-credentials-get"|"record-ad-auction-events"|"rewriter"|"run-ad-auction"|"screen-wake-lock"|"serial"|"shared-autofill"|"shared-storage"|"shared-storage-select-url"|"smart-card"|"speaker-selection"|"storage-access"|"sub-apps"|"summarizer"|"sync-xhr"|"translator"|"unload"|"usb"|"usb-unrestricted"|"vertical-scroll"|"web-app-installation"|"web-printing"|"web-share"|"window-management"|"writer"|"xr-spatial-tracking"; /** * Reason for a permissions policy feature to be disabled. */ @@ -12665,10 +12703,6 @@ https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-expl startUrl?: string; themeColor?: string; } - /** - * Enum of possible auto-response for permission / prompt dialogs. - */ - export type AutoResponseMode = "none"|"autoAccept"|"autoReject"|"autoOptOut"; /** * The type of a frameNavigated event. */ @@ -13360,17 +13394,18 @@ Only returns values if the feature flag 'WebAppEnableManifestId' is enabled */ recommendedId?: string; } - export type getAdScriptAncestryIdsParameters = { + export type getAdScriptAncestryParameters = { frameId: FrameId; } - export type getAdScriptAncestryIdsReturnValue = { + export type getAdScriptAncestryReturnValue = { /** * The ancestry chain of ad script identifiers leading to this frame's -creation, ordered from the most immediate script (in the frame creation +creation, along with the root script's filterlist rule. The ancestry +chain is ordered from the most immediate script (in the frame creation stack) to more distant ancestors (that created the immediately preceding script). Only sent if frame is labelled as an ad and ids are available. */ - adScriptAncestryIds: AdScriptId[]; + adScriptAncestry?: AdScriptAncestry; } /** * Returns present frame tree structure. @@ -14042,7 +14077,7 @@ cross-process navigation. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode */ export type setSPCTransactionModeParameters = { - mode: AutoResponseMode; + mode: "none"|"autoAccept"|"autoChooseToAuthAnotherWay"|"autoReject"|"autoOptOut"; } export type setSPCTransactionModeReturnValue = { } @@ -14051,7 +14086,7 @@ https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-trans https://html.spec.whatwg.org/multipage/system-state.html#rph-automation */ export type setRPHRegistrationModeParameters = { - mode: AutoResponseMode; + mode: "none"|"autoAccept"|"autoReject"; } export type setRPHRegistrationModeReturnValue = { } @@ -14903,15 +14938,10 @@ Present only for SharedStorageAccessMethod: set. */ ignoreIfPresent?: boolean; /** - * If the method is called on a shared storage worklet, or as part of -a shared storage worklet script, it will have a number for the -associated worklet, denoting the (0-indexed) order of the worklet's + * A number denoting the (0-based) order of the worklet's creation relative to all other shared storage worklets created by documents using the current storage partition. -Present only for SharedStorageAccessMethods: addModule, createWorklet, -run, selectURL, and any other SharedStorageAccessMethod when the -SharedStorageAccessScope is sharedStorageWorklet. -TODO(crbug.com/401011862): Pass this only for addModule & createWorklet. +Present only for SharedStorageAccessMethods: addModule, createWorklet. */ workletOrdinal?: number; /** @@ -15365,6 +15395,13 @@ associated shared storage worklet. netErrorName?: string; httpStatusCode?: number; } + export type attributionReportingVerboseDebugReportSentPayload = { + url: string; + body?: { [key: string]: string }[]; + netError?: number; + netErrorName?: string; + httpStatusCode?: number; + } /** * Returns a storage key given a frame id. @@ -16547,7 +16584,7 @@ to run paused targets. export type MemoryDumpConfig = { [key: string]: string }; export interface TraceConfig { /** - * Controls how the trace buffer stores data. + * Controls how the trace buffer stores data. The default is `recordUntilFull`. */ recordMode?: "recordUntilFull"|"recordContinuously"|"recordAsMuchAsPossible"|"echoToConsole"; /** @@ -18193,15 +18230,30 @@ https://web.dev/learn/pwa/web-app-manifest. fileHandlers: FileHandler[]; } /** - * Installs the given manifest identity, optionally using the given install_url -or IWA bundle location. + * Installs the given manifest identity, optionally using the given installUrlOrBundleUrl + +IWA-specific install description: +manifestId corresponds to isolated-app:// + web_package::SignedWebBundleId + +File installation mode: +The installUrlOrBundleUrl can be either file:// or http(s):// pointing +to a signed web bundle (.swbn). In this case SignedWebBundleId must correspond to +The .swbn file's signing key. + +Dev proxy installation mode: +installUrlOrBundleUrl must be http(s):// that serves dev mode IWA. +web_package::SignedWebBundleId must be of type dev proxy. + +The advantage of dev proxy mode is that all changes to IWA +automatically will be reflected in the running app without +reinstallation. + +To generate bundle id for proxy mode: +1. Generate 32 random bytes. +2. Add a specific suffix 0x00 at the end. +3. Encode the entire sequence using Base32 without padding. -TODO(crbug.com/337872319) Support IWA to meet the following specific -requirement. -IWA-specific install description: If the manifest_id is isolated-app://, -install_url_or_bundle_url is required, and can be either an http(s) URL or -file:// URL pointing to a signed web bundle (.swbn). The .swbn file's -signing key must correspond to manifest_id. If Chrome is not in IWA dev +If Chrome is not in IWA dev mode, the installation will fail, regardless of the state of the allowlist. */ export type installParameters = { @@ -21420,6 +21472,7 @@ Error was thrown. "Storage.attributionReportingSourceRegistered": Storage.attributionReportingSourceRegisteredPayload; "Storage.attributionReportingTriggerRegistered": Storage.attributionReportingTriggerRegisteredPayload; "Storage.attributionReportingReportSent": Storage.attributionReportingReportSentPayload; + "Storage.attributionReportingVerboseDebugReportSent": Storage.attributionReportingVerboseDebugReportSentPayload; "Target.attachedToTarget": Target.attachedToTargetPayload; "Target.detachedFromTarget": Target.detachedFromTargetPayload; "Target.receivedMessageFromTarget": Target.receivedMessageFromTargetPayload; @@ -21690,6 +21743,7 @@ Error was thrown. "Emulation.setEmitTouchEventsForMouse": Emulation.setEmitTouchEventsForMouseParameters; "Emulation.setEmulatedMedia": Emulation.setEmulatedMediaParameters; "Emulation.setEmulatedVisionDeficiency": Emulation.setEmulatedVisionDeficiencyParameters; + "Emulation.setEmulatedOSTextScale": Emulation.setEmulatedOSTextScaleParameters; "Emulation.setGeolocationOverride": Emulation.setGeolocationOverrideParameters; "Emulation.getOverriddenSensorInformation": Emulation.getOverriddenSensorInformationParameters; "Emulation.setSensorOverrideEnabled": Emulation.setSensorOverrideEnabledParameters; @@ -21848,7 +21902,7 @@ Error was thrown. "Page.getInstallabilityErrors": Page.getInstallabilityErrorsParameters; "Page.getManifestIcons": Page.getManifestIconsParameters; "Page.getAppId": Page.getAppIdParameters; - "Page.getAdScriptAncestryIds": Page.getAdScriptAncestryIdsParameters; + "Page.getAdScriptAncestry": Page.getAdScriptAncestryParameters; "Page.getFrameTree": Page.getFrameTreeParameters; "Page.getLayoutMetrics": Page.getLayoutMetricsParameters; "Page.getNavigationHistory": Page.getNavigationHistoryParameters; @@ -22323,6 +22377,7 @@ Error was thrown. "Emulation.setEmitTouchEventsForMouse": Emulation.setEmitTouchEventsForMouseReturnValue; "Emulation.setEmulatedMedia": Emulation.setEmulatedMediaReturnValue; "Emulation.setEmulatedVisionDeficiency": Emulation.setEmulatedVisionDeficiencyReturnValue; + "Emulation.setEmulatedOSTextScale": Emulation.setEmulatedOSTextScaleReturnValue; "Emulation.setGeolocationOverride": Emulation.setGeolocationOverrideReturnValue; "Emulation.getOverriddenSensorInformation": Emulation.getOverriddenSensorInformationReturnValue; "Emulation.setSensorOverrideEnabled": Emulation.setSensorOverrideEnabledReturnValue; @@ -22481,7 +22536,7 @@ Error was thrown. "Page.getInstallabilityErrors": Page.getInstallabilityErrorsReturnValue; "Page.getManifestIcons": Page.getManifestIconsReturnValue; "Page.getAppId": Page.getAppIdReturnValue; - "Page.getAdScriptAncestryIds": Page.getAdScriptAncestryIdsReturnValue; + "Page.getAdScriptAncestry": Page.getAdScriptAncestryReturnValue; "Page.getFrameTree": Page.getFrameTreeReturnValue; "Page.getLayoutMetrics": Page.getLayoutMetricsReturnValue; "Page.getNavigationHistory": Page.getNavigationHistoryReturnValue; diff --git a/packages/playwright-core/src/server/deviceDescriptorsSource.json b/packages/playwright-core/src/server/deviceDescriptorsSource.json index f260c0d5e39d9..ac04fcab6f91a 100644 --- a/packages/playwright-core/src/server/deviceDescriptorsSource.json +++ b/packages/playwright-core/src/server/deviceDescriptorsSource.json @@ -110,7 +110,7 @@ "defaultBrowserType": "webkit" }, "Galaxy S5": { - "userAgent": "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 360, "height": 640 @@ -121,7 +121,7 @@ "defaultBrowserType": "chromium" }, "Galaxy S5 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 640, "height": 360 @@ -132,7 +132,7 @@ "defaultBrowserType": "chromium" }, "Galaxy S8": { - "userAgent": "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 360, "height": 740 @@ -143,7 +143,7 @@ "defaultBrowserType": "chromium" }, "Galaxy S8 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 740, "height": 360 @@ -154,7 +154,7 @@ "defaultBrowserType": "chromium" }, "Galaxy S9+": { - "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 320, "height": 658 @@ -165,7 +165,7 @@ "defaultBrowserType": "chromium" }, "Galaxy S9+ landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 658, "height": 320 @@ -176,7 +176,7 @@ "defaultBrowserType": "chromium" }, "Galaxy S24": { - "userAgent": "Mozilla/5.0 (Linux; Android 14; SM-S921U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 14; SM-S921U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 480, "height": 1040 @@ -187,7 +187,7 @@ "defaultBrowserType": "chromium" }, "Galaxy S24 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 14; SM-S921U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 14; SM-S921U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 1040, "height": 480 @@ -198,7 +198,7 @@ "defaultBrowserType": "chromium" }, "Galaxy A55": { - "userAgent": "Mozilla/5.0 (Linux; Android 14; SM-A556B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 14; SM-A556B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 480, "height": 1040 @@ -209,7 +209,7 @@ "defaultBrowserType": "chromium" }, "Galaxy A55 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 14; SM-A556B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 14; SM-A556B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 1040, "height": 480 @@ -220,7 +220,7 @@ "defaultBrowserType": "chromium" }, "Galaxy Tab S4": { - "userAgent": "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Safari/537.36", "viewport": { "width": 712, "height": 1138 @@ -231,7 +231,7 @@ "defaultBrowserType": "chromium" }, "Galaxy Tab S4 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Safari/537.36", "viewport": { "width": 1138, "height": 712 @@ -242,7 +242,7 @@ "defaultBrowserType": "chromium" }, "Galaxy Tab S9": { - "userAgent": "Mozilla/5.0 (Linux; Android 14; SM-X710) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 14; SM-X710) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Safari/537.36", "viewport": { "width": 640, "height": 1024 @@ -253,7 +253,7 @@ "defaultBrowserType": "chromium" }, "Galaxy Tab S9 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 14; SM-X710) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 14; SM-X710) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Safari/537.36", "viewport": { "width": 1024, "height": 640 @@ -1208,7 +1208,7 @@ "defaultBrowserType": "webkit" }, "LG Optimus L70": { - "userAgent": "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 384, "height": 640 @@ -1219,7 +1219,7 @@ "defaultBrowserType": "chromium" }, "LG Optimus L70 landscape": { - "userAgent": "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 640, "height": 384 @@ -1230,7 +1230,7 @@ "defaultBrowserType": "chromium" }, "Microsoft Lumia 550": { - "userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36 Edge/14.14263", + "userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36 Edge/14.14263", "viewport": { "width": 360, "height": 640 @@ -1241,7 +1241,7 @@ "defaultBrowserType": "chromium" }, "Microsoft Lumia 550 landscape": { - "userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36 Edge/14.14263", + "userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36 Edge/14.14263", "viewport": { "width": 640, "height": 360 @@ -1252,7 +1252,7 @@ "defaultBrowserType": "chromium" }, "Microsoft Lumia 950": { - "userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36 Edge/14.14263", + "userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36 Edge/14.14263", "viewport": { "width": 360, "height": 640 @@ -1263,7 +1263,7 @@ "defaultBrowserType": "chromium" }, "Microsoft Lumia 950 landscape": { - "userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36 Edge/14.14263", + "userAgent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36 Edge/14.14263", "viewport": { "width": 640, "height": 360 @@ -1274,7 +1274,7 @@ "defaultBrowserType": "chromium" }, "Nexus 10": { - "userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Safari/537.36", "viewport": { "width": 800, "height": 1280 @@ -1285,7 +1285,7 @@ "defaultBrowserType": "chromium" }, "Nexus 10 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Safari/537.36", "viewport": { "width": 1280, "height": 800 @@ -1296,7 +1296,7 @@ "defaultBrowserType": "chromium" }, "Nexus 4": { - "userAgent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 384, "height": 640 @@ -1307,7 +1307,7 @@ "defaultBrowserType": "chromium" }, "Nexus 4 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 640, "height": 384 @@ -1318,7 +1318,7 @@ "defaultBrowserType": "chromium" }, "Nexus 5": { - "userAgent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 360, "height": 640 @@ -1329,7 +1329,7 @@ "defaultBrowserType": "chromium" }, "Nexus 5 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 640, "height": 360 @@ -1340,7 +1340,7 @@ "defaultBrowserType": "chromium" }, "Nexus 5X": { - "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 412, "height": 732 @@ -1351,7 +1351,7 @@ "defaultBrowserType": "chromium" }, "Nexus 5X landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 732, "height": 412 @@ -1362,7 +1362,7 @@ "defaultBrowserType": "chromium" }, "Nexus 6": { - "userAgent": "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 412, "height": 732 @@ -1373,7 +1373,7 @@ "defaultBrowserType": "chromium" }, "Nexus 6 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 732, "height": 412 @@ -1384,7 +1384,7 @@ "defaultBrowserType": "chromium" }, "Nexus 6P": { - "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 412, "height": 732 @@ -1395,7 +1395,7 @@ "defaultBrowserType": "chromium" }, "Nexus 6P landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 732, "height": 412 @@ -1406,7 +1406,7 @@ "defaultBrowserType": "chromium" }, "Nexus 7": { - "userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Safari/537.36", "viewport": { "width": 600, "height": 960 @@ -1417,7 +1417,7 @@ "defaultBrowserType": "chromium" }, "Nexus 7 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Safari/537.36", "viewport": { "width": 960, "height": 600 @@ -1472,7 +1472,7 @@ "defaultBrowserType": "webkit" }, "Pixel 2": { - "userAgent": "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 411, "height": 731 @@ -1483,7 +1483,7 @@ "defaultBrowserType": "chromium" }, "Pixel 2 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 731, "height": 411 @@ -1494,7 +1494,7 @@ "defaultBrowserType": "chromium" }, "Pixel 2 XL": { - "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 411, "height": 823 @@ -1505,7 +1505,7 @@ "defaultBrowserType": "chromium" }, "Pixel 2 XL landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 823, "height": 411 @@ -1516,7 +1516,7 @@ "defaultBrowserType": "chromium" }, "Pixel 3": { - "userAgent": "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 393, "height": 786 @@ -1527,7 +1527,7 @@ "defaultBrowserType": "chromium" }, "Pixel 3 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 786, "height": 393 @@ -1538,7 +1538,7 @@ "defaultBrowserType": "chromium" }, "Pixel 4": { - "userAgent": "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 353, "height": 745 @@ -1549,7 +1549,7 @@ "defaultBrowserType": "chromium" }, "Pixel 4 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 745, "height": 353 @@ -1560,7 +1560,7 @@ "defaultBrowserType": "chromium" }, "Pixel 4a (5G)": { - "userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "screen": { "width": 412, "height": 892 @@ -1575,7 +1575,7 @@ "defaultBrowserType": "chromium" }, "Pixel 4a (5G) landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "screen": { "height": 892, "width": 412 @@ -1590,7 +1590,7 @@ "defaultBrowserType": "chromium" }, "Pixel 5": { - "userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "screen": { "width": 393, "height": 851 @@ -1605,7 +1605,7 @@ "defaultBrowserType": "chromium" }, "Pixel 5 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "screen": { "width": 851, "height": 393 @@ -1620,7 +1620,7 @@ "defaultBrowserType": "chromium" }, "Pixel 7": { - "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "screen": { "width": 412, "height": 915 @@ -1635,7 +1635,7 @@ "defaultBrowserType": "chromium" }, "Pixel 7 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "screen": { "width": 915, "height": 412 @@ -1650,7 +1650,7 @@ "defaultBrowserType": "chromium" }, "Moto G4": { - "userAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 360, "height": 640 @@ -1661,7 +1661,7 @@ "defaultBrowserType": "chromium" }, "Moto G4 landscape": { - "userAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Mobile Safari/537.36", + "userAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Mobile Safari/537.36", "viewport": { "width": 640, "height": 360 @@ -1672,7 +1672,7 @@ "defaultBrowserType": "chromium" }, "Desktop Chrome HiDPI": { - "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Safari/537.36", + "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Safari/537.36", "screen": { "width": 1792, "height": 1120 @@ -1687,7 +1687,7 @@ "defaultBrowserType": "chromium" }, "Desktop Edge HiDPI": { - "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Safari/537.36 Edg/138.0.7204.35", + "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Safari/537.36 Edg/139.0.7258.5", "screen": { "width": 1792, "height": 1120 @@ -1732,7 +1732,7 @@ "defaultBrowserType": "webkit" }, "Desktop Chrome": { - "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Safari/537.36", + "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Safari/537.36", "screen": { "width": 1920, "height": 1080 @@ -1747,7 +1747,7 @@ "defaultBrowserType": "chromium" }, "Desktop Edge": { - "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.7204.35 Safari/537.36 Edg/138.0.7204.35", + "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.7258.5 Safari/537.36 Edg/139.0.7258.5", "screen": { "width": 1920, "height": 1080 diff --git a/packages/playwright-core/types/protocol.d.ts b/packages/playwright-core/types/protocol.d.ts index 8b3fa03f1b1af..1df8156c8ac39 100644 --- a/packages/playwright-core/types/protocol.d.ts +++ b/packages/playwright-core/types/protocol.d.ts @@ -3898,7 +3898,7 @@ front-end. /** * Pseudo element type. */ - export type PseudoType = "first-line"|"first-letter"|"checkmark"|"before"|"after"|"picker-icon"|"marker"|"backdrop"|"column"|"selection"|"search-text"|"target-text"|"spelling-error"|"grammar-error"|"highlight"|"first-line-inherited"|"scroll-marker"|"scroll-marker-group"|"scroll-button"|"scrollbar"|"scrollbar-thumb"|"scrollbar-button"|"scrollbar-track"|"scrollbar-track-piece"|"scrollbar-corner"|"resizer"|"input-list-button"|"view-transition"|"view-transition-group"|"view-transition-image-pair"|"view-transition-old"|"view-transition-new"|"placeholder"|"file-selector-button"|"details-content"|"picker"|"permission-icon"; + export type PseudoType = "first-line"|"first-letter"|"checkmark"|"before"|"after"|"picker-icon"|"marker"|"backdrop"|"column"|"selection"|"search-text"|"target-text"|"spelling-error"|"grammar-error"|"highlight"|"first-line-inherited"|"scroll-marker"|"scroll-marker-group"|"scroll-button"|"scrollbar"|"scrollbar-thumb"|"scrollbar-button"|"scrollbar-track"|"scrollbar-track-piece"|"scrollbar-corner"|"resizer"|"input-list-button"|"view-transition"|"view-transition-group"|"view-transition-image-pair"|"view-transition-group-children"|"view-transition-old"|"view-transition-new"|"placeholder"|"file-selector-button"|"details-content"|"picker"|"permission-icon"; /** * Shadow root type. */ @@ -6282,6 +6282,11 @@ Missing optional values will be filled in by the target with what it would norma mobile: boolean; bitness?: string; wow64?: boolean; + /** + * Used to specify User Agent form-factor values. +See https://wicg.github.io/ua-client-hints/#sec-ch-ua-form-factors + */ + formFactors?: string[]; } /** * Used to specify sensor types to emulate. @@ -6579,6 +6584,14 @@ physiologically accurate emulations for medically recognized color vision defici } export type setEmulatedVisionDeficiencyReturnValue = { } + /** + * Emulates the given OS text scale. + */ + export type setEmulatedOSTextScaleParameters = { + scale?: number; + } + export type setEmulatedOSTextScaleReturnValue = { + } /** * Overrides the Geolocation Position or Error. Omitting latitude, longitude or accuracy emulates position unavailable. @@ -9604,6 +9617,11 @@ https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges- * The outer response of signed HTTP exchange which was received from network. */ outerResponse: Response; + /** + * Whether network response for the signed exchange was accompanied by +extra headers. + */ + hasExtraInfo: boolean; /** * Information about the signed exchange header. */ @@ -12045,20 +12063,40 @@ Backend then generates 'inspectNodeRequested' event upon element selection. explanations?: AdFrameExplanation[]; } /** - * Identifies the bottom-most script which caused the frame to be labelled -as an ad. + * Identifies the script which caused a script or frame to be labelled as an +ad. */ export interface AdScriptId { /** - * Script Id of the bottom-most script which caused the frame to be labelled -as an ad. + * Script Id of the script which caused a script or frame to be labelled as +an ad. */ scriptId: Runtime.ScriptId; /** - * Id of adScriptId's debugger. + * Id of scriptId's debugger. */ debuggerId: Runtime.UniqueDebuggerId; } + /** + * Encapsulates the script ancestry and the root script filterlist rule that +caused the frame to be labelled as an ad. Only created when `ancestryChain` +is not empty. + */ + export interface AdScriptAncestry { + /** + * A chain of `AdScriptId`s representing the ancestry of an ad script that +led to the creation of a frame. The chain is ordered from the script +itself (lower level) up to its root ancestor that was flagged by +filterlist. + */ + ancestryChain: AdScriptId[]; + /** + * The filterlist rule that caused the root (last) script in +`ancestryChain` to be ad-tagged. Only populated if the rule is +available. + */ + rootScriptFilterlistRule?: string; + } /** * Indicates whether the frame is a secure context and why it is the case. */ @@ -12073,7 +12111,7 @@ as an ad. in services/network/public/cpp/permissions_policy/permissions_policy_features.json5. LINT.IfChange(PermissionsPolicyFeature) */ - export type PermissionsPolicyFeature = "accelerometer"|"all-screens-capture"|"ambient-light-sensor"|"attribution-reporting"|"autoplay"|"bluetooth"|"browsing-topics"|"camera"|"captured-surface-control"|"ch-dpr"|"ch-device-memory"|"ch-downlink"|"ch-ect"|"ch-prefers-color-scheme"|"ch-prefers-reduced-motion"|"ch-prefers-reduced-transparency"|"ch-rtt"|"ch-save-data"|"ch-ua"|"ch-ua-arch"|"ch-ua-bitness"|"ch-ua-high-entropy-values"|"ch-ua-platform"|"ch-ua-model"|"ch-ua-mobile"|"ch-ua-form-factors"|"ch-ua-full-version"|"ch-ua-full-version-list"|"ch-ua-platform-version"|"ch-ua-wow64"|"ch-viewport-height"|"ch-viewport-width"|"ch-width"|"clipboard-read"|"clipboard-write"|"compute-pressure"|"controlled-frame"|"cross-origin-isolated"|"deferred-fetch"|"deferred-fetch-minimal"|"device-attributes"|"digital-credentials-get"|"direct-sockets"|"direct-sockets-private"|"display-capture"|"document-domain"|"encrypted-media"|"execution-while-out-of-viewport"|"execution-while-not-rendered"|"fenced-unpartitioned-storage-read"|"focus-without-user-activation"|"fullscreen"|"frobulate"|"gamepad"|"geolocation"|"gyroscope"|"hid"|"identity-credentials-get"|"idle-detection"|"interest-cohort"|"join-ad-interest-group"|"keyboard-map"|"language-detector"|"local-fonts"|"local-network-access"|"magnetometer"|"media-playback-while-not-visible"|"microphone"|"midi"|"on-device-speech-recognition"|"otp-credentials"|"payment"|"picture-in-picture"|"popins"|"private-aggregation"|"private-state-token-issuance"|"private-state-token-redemption"|"publickey-credentials-create"|"publickey-credentials-get"|"record-ad-auction-events"|"rewriter"|"run-ad-auction"|"screen-wake-lock"|"serial"|"shared-autofill"|"shared-storage"|"shared-storage-select-url"|"smart-card"|"speaker-selection"|"storage-access"|"sub-apps"|"summarizer"|"sync-xhr"|"translator"|"unload"|"usb"|"usb-unrestricted"|"vertical-scroll"|"web-app-installation"|"web-printing"|"web-share"|"window-management"|"writer"|"xr-spatial-tracking"; + export type PermissionsPolicyFeature = "accelerometer"|"all-screens-capture"|"ambient-light-sensor"|"attribution-reporting"|"autoplay"|"bluetooth"|"browsing-topics"|"camera"|"captured-surface-control"|"ch-dpr"|"ch-device-memory"|"ch-downlink"|"ch-ect"|"ch-prefers-color-scheme"|"ch-prefers-reduced-motion"|"ch-prefers-reduced-transparency"|"ch-rtt"|"ch-save-data"|"ch-ua"|"ch-ua-arch"|"ch-ua-bitness"|"ch-ua-high-entropy-values"|"ch-ua-platform"|"ch-ua-model"|"ch-ua-mobile"|"ch-ua-form-factors"|"ch-ua-full-version"|"ch-ua-full-version-list"|"ch-ua-platform-version"|"ch-ua-wow64"|"ch-viewport-height"|"ch-viewport-width"|"ch-width"|"clipboard-read"|"clipboard-write"|"compute-pressure"|"controlled-frame"|"cross-origin-isolated"|"deferred-fetch"|"deferred-fetch-minimal"|"device-attributes"|"digital-credentials-get"|"direct-sockets"|"direct-sockets-private"|"display-capture"|"document-domain"|"encrypted-media"|"execution-while-out-of-viewport"|"execution-while-not-rendered"|"fenced-unpartitioned-storage-read"|"focus-without-user-activation"|"fullscreen"|"frobulate"|"gamepad"|"geolocation"|"gyroscope"|"hid"|"identity-credentials-get"|"idle-detection"|"interest-cohort"|"join-ad-interest-group"|"keyboard-map"|"language-detector"|"language-model"|"local-fonts"|"local-network-access"|"magnetometer"|"media-playback-while-not-visible"|"microphone"|"midi"|"on-device-speech-recognition"|"otp-credentials"|"payment"|"picture-in-picture"|"popins"|"private-aggregation"|"private-state-token-issuance"|"private-state-token-redemption"|"publickey-credentials-create"|"publickey-credentials-get"|"record-ad-auction-events"|"rewriter"|"run-ad-auction"|"screen-wake-lock"|"serial"|"shared-autofill"|"shared-storage"|"shared-storage-select-url"|"smart-card"|"speaker-selection"|"storage-access"|"sub-apps"|"summarizer"|"sync-xhr"|"translator"|"unload"|"usb"|"usb-unrestricted"|"vertical-scroll"|"web-app-installation"|"web-printing"|"web-share"|"window-management"|"writer"|"xr-spatial-tracking"; /** * Reason for a permissions policy feature to be disabled. */ @@ -12665,10 +12703,6 @@ https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-expl startUrl?: string; themeColor?: string; } - /** - * Enum of possible auto-response for permission / prompt dialogs. - */ - export type AutoResponseMode = "none"|"autoAccept"|"autoReject"|"autoOptOut"; /** * The type of a frameNavigated event. */ @@ -13360,17 +13394,18 @@ Only returns values if the feature flag 'WebAppEnableManifestId' is enabled */ recommendedId?: string; } - export type getAdScriptAncestryIdsParameters = { + export type getAdScriptAncestryParameters = { frameId: FrameId; } - export type getAdScriptAncestryIdsReturnValue = { + export type getAdScriptAncestryReturnValue = { /** * The ancestry chain of ad script identifiers leading to this frame's -creation, ordered from the most immediate script (in the frame creation +creation, along with the root script's filterlist rule. The ancestry +chain is ordered from the most immediate script (in the frame creation stack) to more distant ancestors (that created the immediately preceding script). Only sent if frame is labelled as an ad and ids are available. */ - adScriptAncestryIds: AdScriptId[]; + adScriptAncestry?: AdScriptAncestry; } /** * Returns present frame tree structure. @@ -14042,7 +14077,7 @@ cross-process navigation. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode */ export type setSPCTransactionModeParameters = { - mode: AutoResponseMode; + mode: "none"|"autoAccept"|"autoChooseToAuthAnotherWay"|"autoReject"|"autoOptOut"; } export type setSPCTransactionModeReturnValue = { } @@ -14051,7 +14086,7 @@ https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-trans https://html.spec.whatwg.org/multipage/system-state.html#rph-automation */ export type setRPHRegistrationModeParameters = { - mode: AutoResponseMode; + mode: "none"|"autoAccept"|"autoReject"; } export type setRPHRegistrationModeReturnValue = { } @@ -14903,15 +14938,10 @@ Present only for SharedStorageAccessMethod: set. */ ignoreIfPresent?: boolean; /** - * If the method is called on a shared storage worklet, or as part of -a shared storage worklet script, it will have a number for the -associated worklet, denoting the (0-indexed) order of the worklet's + * A number denoting the (0-based) order of the worklet's creation relative to all other shared storage worklets created by documents using the current storage partition. -Present only for SharedStorageAccessMethods: addModule, createWorklet, -run, selectURL, and any other SharedStorageAccessMethod when the -SharedStorageAccessScope is sharedStorageWorklet. -TODO(crbug.com/401011862): Pass this only for addModule & createWorklet. +Present only for SharedStorageAccessMethods: addModule, createWorklet. */ workletOrdinal?: number; /** @@ -15365,6 +15395,13 @@ associated shared storage worklet. netErrorName?: string; httpStatusCode?: number; } + export type attributionReportingVerboseDebugReportSentPayload = { + url: string; + body?: { [key: string]: string }[]; + netError?: number; + netErrorName?: string; + httpStatusCode?: number; + } /** * Returns a storage key given a frame id. @@ -16547,7 +16584,7 @@ to run paused targets. export type MemoryDumpConfig = { [key: string]: string }; export interface TraceConfig { /** - * Controls how the trace buffer stores data. + * Controls how the trace buffer stores data. The default is `recordUntilFull`. */ recordMode?: "recordUntilFull"|"recordContinuously"|"recordAsMuchAsPossible"|"echoToConsole"; /** @@ -18193,15 +18230,30 @@ https://web.dev/learn/pwa/web-app-manifest. fileHandlers: FileHandler[]; } /** - * Installs the given manifest identity, optionally using the given install_url -or IWA bundle location. + * Installs the given manifest identity, optionally using the given installUrlOrBundleUrl + +IWA-specific install description: +manifestId corresponds to isolated-app:// + web_package::SignedWebBundleId + +File installation mode: +The installUrlOrBundleUrl can be either file:// or http(s):// pointing +to a signed web bundle (.swbn). In this case SignedWebBundleId must correspond to +The .swbn file's signing key. + +Dev proxy installation mode: +installUrlOrBundleUrl must be http(s):// that serves dev mode IWA. +web_package::SignedWebBundleId must be of type dev proxy. + +The advantage of dev proxy mode is that all changes to IWA +automatically will be reflected in the running app without +reinstallation. + +To generate bundle id for proxy mode: +1. Generate 32 random bytes. +2. Add a specific suffix 0x00 at the end. +3. Encode the entire sequence using Base32 without padding. -TODO(crbug.com/337872319) Support IWA to meet the following specific -requirement. -IWA-specific install description: If the manifest_id is isolated-app://, -install_url_or_bundle_url is required, and can be either an http(s) URL or -file:// URL pointing to a signed web bundle (.swbn). The .swbn file's -signing key must correspond to manifest_id. If Chrome is not in IWA dev +If Chrome is not in IWA dev mode, the installation will fail, regardless of the state of the allowlist. */ export type installParameters = { @@ -21420,6 +21472,7 @@ Error was thrown. "Storage.attributionReportingSourceRegistered": Storage.attributionReportingSourceRegisteredPayload; "Storage.attributionReportingTriggerRegistered": Storage.attributionReportingTriggerRegisteredPayload; "Storage.attributionReportingReportSent": Storage.attributionReportingReportSentPayload; + "Storage.attributionReportingVerboseDebugReportSent": Storage.attributionReportingVerboseDebugReportSentPayload; "Target.attachedToTarget": Target.attachedToTargetPayload; "Target.detachedFromTarget": Target.detachedFromTargetPayload; "Target.receivedMessageFromTarget": Target.receivedMessageFromTargetPayload; @@ -21690,6 +21743,7 @@ Error was thrown. "Emulation.setEmitTouchEventsForMouse": Emulation.setEmitTouchEventsForMouseParameters; "Emulation.setEmulatedMedia": Emulation.setEmulatedMediaParameters; "Emulation.setEmulatedVisionDeficiency": Emulation.setEmulatedVisionDeficiencyParameters; + "Emulation.setEmulatedOSTextScale": Emulation.setEmulatedOSTextScaleParameters; "Emulation.setGeolocationOverride": Emulation.setGeolocationOverrideParameters; "Emulation.getOverriddenSensorInformation": Emulation.getOverriddenSensorInformationParameters; "Emulation.setSensorOverrideEnabled": Emulation.setSensorOverrideEnabledParameters; @@ -21848,7 +21902,7 @@ Error was thrown. "Page.getInstallabilityErrors": Page.getInstallabilityErrorsParameters; "Page.getManifestIcons": Page.getManifestIconsParameters; "Page.getAppId": Page.getAppIdParameters; - "Page.getAdScriptAncestryIds": Page.getAdScriptAncestryIdsParameters; + "Page.getAdScriptAncestry": Page.getAdScriptAncestryParameters; "Page.getFrameTree": Page.getFrameTreeParameters; "Page.getLayoutMetrics": Page.getLayoutMetricsParameters; "Page.getNavigationHistory": Page.getNavigationHistoryParameters; @@ -22323,6 +22377,7 @@ Error was thrown. "Emulation.setEmitTouchEventsForMouse": Emulation.setEmitTouchEventsForMouseReturnValue; "Emulation.setEmulatedMedia": Emulation.setEmulatedMediaReturnValue; "Emulation.setEmulatedVisionDeficiency": Emulation.setEmulatedVisionDeficiencyReturnValue; + "Emulation.setEmulatedOSTextScale": Emulation.setEmulatedOSTextScaleReturnValue; "Emulation.setGeolocationOverride": Emulation.setGeolocationOverrideReturnValue; "Emulation.getOverriddenSensorInformation": Emulation.getOverriddenSensorInformationReturnValue; "Emulation.setSensorOverrideEnabled": Emulation.setSensorOverrideEnabledReturnValue; @@ -22481,7 +22536,7 @@ Error was thrown. "Page.getInstallabilityErrors": Page.getInstallabilityErrorsReturnValue; "Page.getManifestIcons": Page.getManifestIconsReturnValue; "Page.getAppId": Page.getAppIdReturnValue; - "Page.getAdScriptAncestryIds": Page.getAdScriptAncestryIdsReturnValue; + "Page.getAdScriptAncestry": Page.getAdScriptAncestryReturnValue; "Page.getFrameTree": Page.getFrameTreeReturnValue; "Page.getLayoutMetrics": Page.getLayoutMetricsReturnValue; "Page.getNavigationHistory": Page.getNavigationHistoryReturnValue; diff --git a/tests/playwright-test/reporter-html.spec.ts b/tests/playwright-test/reporter-html.spec.ts index 6b99892b026a9..6b525885bcbc1 100644 --- a/tests/playwright-test/reporter-html.spec.ts +++ b/tests/playwright-test/reporter-html.spec.ts @@ -1082,7 +1082,7 @@ for (const useIntermediateMergeReport of [true, false] as const) { await page.getByRole('link', { name: 'passing' }).click(); const expectedAttachments = [ - ['screenshot', 'screenshot.png', 'd606c7545cd71c2b0c27d9f99edbad4fa39f1174.png'], + ['screenshot', 'screenshot.png', '7a33d5db6370b6de345e990751aa1f1da65ad675.png'], ['some-pdf', 'some-pdf.pdf', '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33.pdf'], ['madeup-contentType', 'madeup-contentType.dat', '62cdb7020ff920e5aa642c3d4066950dd1f01f4d.dat'], ['screenshot-that-already-has-an-extension-with-madeup.png', 'screenshot-that-already-has-an-extension-with-madeup.png', '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8.png'], @@ -1101,7 +1101,7 @@ for (const useIntermediateMergeReport of [true, false] as const) { const files = await fs.promises.readdir(path.join(testInfo.outputPath('playwright-report'), 'data')); expect(new Set(files)).toEqual(new Set([ - 'd606c7545cd71c2b0c27d9f99edbad4fa39f1174.png', // screenshot + '7a33d5db6370b6de345e990751aa1f1da65ad675.png', // screenshot '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33.pdf', // some-pdf '62cdb7020ff920e5aa642c3d4066950dd1f01f4d.dat', // madeup-contentType '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8.png', // screenshot-that-already-has-an-extension-with-madeup.png