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
67.13k stars 3.69k forks source link

[Bug]: 149 aria snapshot feedback #33492

Open debs-obrien opened 2 weeks ago

debs-obrien commented 2 weeks ago

Version

@latest

Steps to reproduce

open codegen and generate aria snapshot for getting started link(green button)

Expected behavior

Actual behavior

opening codegen to generate ariasnapshots.

  1. When recording there is an aria snapshots tab but it remained blank Image

  2. The log now has arrows to expand downwards but there seems nothing to expand Image

  3. When trying to get the aria snapshot for the getting started button/link on the home page it gives role of banner. Why does it not generate a getByRole('link')?? await expect(page.getByRole('banner')).toMatchAriaSnapshot(- link "Get started") image

Additional context

Environment

System: OS: macOS 15.1 CPU: (10) arm64 Apple M1 Max Memory: 709.84 MB / 64.00 GB Binaries: Node: 20.11.1 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.2.4 - /usr/local/bin/npm pnpm: 8.5.0 - /usr/local/bin/pnpm IDEs: VSCode: 1.95.1 - /usr/local/bin/code Languages: Bash: 3.2.57 - /bin/bash npmPackages: @playwright/test: ^1.49.0-alpha-2024-11-07 => 1.49.0-alpha-2024-11-07

pavelfeldman commented 2 weeks ago

From Yury:

- - link "Get started2"
+ - banner:
+   - heading "Playwright enables reliable end-to-end testing for modern web apps." [level=1]
+   - link "Get started"
+   - link "Star microsoft/playwright on GitHub": Star
+   - link "66k+ stargazers on GitHub": 66k+