-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Description
Context:
- Playwright Version:
Version 1.30.0 - Operating System:
MacOS Monterey Version 12.2.1 with M1(2020) - Node.js version:
v16.13.1 - Browser:
WebKit 16.4 - Extra:
- Possible recurrence of issues/10108
- Issue is observed for both headless and headful configuration
Code Snippet
// tests/example.spec.ts
import { test, expect } from '@playwright/test';
test('has title', async ({ page }) => {
await page.goto('https://playwright.dev/');
// Expect a title "to contain" a substring.
await expect(page).toHaveTitle(/Playwright/);
});
test('get started link', async ({ page }) => {
await page.goto('https://playwright.dev/');
// Click the get started link.
await page.getByRole('link', { name: 'Get started' }).click();
// Expects the URL to contain intro.
await expect(page).toHaveURL(/.*intro/);
});Describe the bug
- Playwright fresh install
npm init playwright@latest
Getting started with writing end-to-end tests with Playwright:
Initializing project in '.'
✔ Do you want to use TypeScript or JavaScript? · TypeScript
✔ Where to put your end-to-end tests? · tests
✔ Add a GitHub Actions workflow? (y/N) · true
✔ Install Playwright browsers (can be done manually via 'npx playwright install')? (Y/n) · true
Initializing NPM project (npm init -y)…
Wrote to .../ts-playwright/package.json:
{
"name": "ts-playwright",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
Installing Playwright Test (npm install --save-dev @playwright/test)…
added 3 packages, and audited 4 packages in 2s
found 0 vulnerabilities
Downloading browsers (npx playwright install)…
Downloading Chromium 110.0.5481.38 (playwright build v1045) from https://playwright.azureedge.net/builds/chromium/1045/chromium-mac-arm64.zip
123.8 Mb [====================] 100% 0.0s
Chromium 110.0.5481.38 (playwright build v1045) downloaded to .../Library/Caches/ms-playwright/chromium-1045
Downloading Firefox 108.0.2 (playwright build v1372) from https://playwright.azureedge.net/builds/firefox/1372/firefox-mac-11-arm64.zip
69.8 Mb [====================] 100% 0.0s
Firefox 108.0.2 (playwright build v1372) downloaded to .../Library/Caches/ms-playwright/firefox-1372
Downloading Webkit 16.4 (playwright build v1767) from https://playwright.azureedge.net/builds/webkit/1767/webkit-mac-12-arm64.zip
56.9 Mb [====================] 100% 0.0s
Webkit 16.4 (playwright build v1767) downloaded to .../Library/Caches/ms-playwright/webkit-1767
Writing playwright.config.ts.
Writing .github/workflows/playwright.yml.
Writing tests/example.spec.ts.
Writing tests-examples/demo-todo-app.spec.ts.
Writing package.json.
✔ Success! Created a Playwright Test project at .../javascript-projects/ts-playwright
- Run test, see attached img for sample HTML report
npx playwright test
Running 6 tests using 4 workers
1) [webkit] › example.spec.ts:3:5 › has title ====================================================
browserContext.newPage: Target closed
2) [webkit] › example.spec.ts:10:5 › get started link ============================================
browserContext.newPage: Target closed
2 failed
[webkit] › example.spec.ts:3:5 › has title =====================================================
[webkit] › example.spec.ts:10:5 › get started link =============================================
4 passed (7.8s)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
