microsoft / microsoft/playwright-dotnet
[Bug]: AriaSnapshotAsync ignores Boxes in Page and Locator
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3k
- Forks
- 304
- Avg merge
- 20h 47m
- Merged PRs (30d)
- 6
Description
Version
1.62.0; also reproduced on main at bda416e.
Steps to reproduce
Reproduction commit: four failing tests, without the fix.
git clone https://github.com/GalayM/playwright-dotnet.git
cd playwright-dotnet
git checkout 91b2050554fdf5e1e095644e76226f32f16fb1e4
dotnet run --project src/tools/Playwright.Tooling -- download-drivers --basepath .
dotnet build src/Playwright.Tests/Playwright.Tests.csproj -f net8.0
pwsh src/Playwright/bin/Debug/netstandard2.0/playwright.ps1 install chromium
dotnet test src/Playwright.Tests/Playwright.Tests.csproj -f net8.0 --filter ShouldIncludeBoundingBoxes
The tests call both Page.AriaSnapshotAsync() and Locator.AriaSnapshotAsync() with Boxes = true, in Default and Ai modes.
Expected behavior
The button's snapshot includes [box=20,30,100,40], as described in the .NET API documentation.
Actual behavior
All four tests fail: the button appears, but its box is missing. In AI mode the snapshot is:
- button "Submit" [ref=e2]
Additional context
The option classes expose Boxes, but both methods omit it from the request sent to the driver.
Environment
Windows 11 Pro, x64; .NET 8; Chromium.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Page.AriaSnapshotAsync() and Locator.AriaSnapshotAsync(), then inspect how their option objects are translated into the driver request. Use the ShouldIncludeBoundingBoxes tests in Playwright.Tests, including the reproduction commit, as the first verification point. Done means all four tests pass and snapshots include the button box when Boxes = true.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100