microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
66.47k stars 3.64k forks source link

[Bug]: Playwright behaves in a different manner when headless + Desktop safari #33185

Closed txomin55 closed 2 days ago

txomin55 commented 5 days ago

Version

1.48.0

Steps to reproduce

  1. Clone this repo https://github.com/txomin55/playwright-error-reproduction/tree/main/vue-project
  2. run pnpm install
  3. run pnpm run test:e2e
  4. tests will fail for webkit
  5. change headless attr to false in playwright.config.js
  6. tests will pass

Expected behavior

I expect the same behaviour when headdless

Actual behavior

Headless runs lead into unexpected errors

Additional context

No response

Environment

System: OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat) CPU: (16) x64 AMD Ryzen 9 5900HX with Radeon Graphics Memory: 16.49 GB / 62.21 GB Container: Yes Binaries: Node: 20.12.1 - ~/.nvm/versions/node/v20.12.1/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v20.12.1/bin/yarn npm: 10.5.0 - ~/.nvm/versions/node/v20.12.1/bin/npm pnpm: 9.1.4 - ~/.nvm/versions/node/v20.12.1/bin/pnpm bun: 1.0.25 - ~/.bun/bin/bun Languages: Bash: 5.2.21 - /usr/bin/bash npmPackages: @playwright/test: ^1.48.0 => 1.48.1

**MORE INFO Headless mode renderes the following when using the UI (WRONG) Image

While non headless displays the following (CORRECT) Image

malikabakhtiyorova commented 5 days ago

All tests passed with and without headless mode having followed the instructions, tests passed for all 3 browsers with headless mode true and false

Version 1.48.0

Environment MacOS 15.0 (24A335)

Binaries: Node: v22.3.0 npm: 10.8.1 pnpm: 9.12.2 @playwright/test: ^1.48.0

txomin55 commented 5 days ago

updating node and pnpm didn't work for me

mxschmitt commented 2 days ago

I was not able to reproduce, I tried it inside:

docker run -it mcr.microsoft.com/playwright:v1.48.1-noble /bin/bash

Is the test failing or do I need to manually compare something inside the trace?

txomin55 commented 2 days ago

You are right... i didnt reproduce it in the CI... so i guess si something weird happening in my local env.

I guess this cam be closed