playwright-go icon indicating copy to clipboard operation
playwright-go copied to clipboard

[Feature]: allow passing ref=true for AriaSnapshot

Open atmnk opened this issue 7 months ago • 3 comments

Does the upstream have similar features? Yes

Is your feature request related to a problem? Please describe. ariaSnapshot in upstream repo supports passing ref=true this mechanism is widely used in playwright mcp server as well. In order to use this repo in GenAI solutions implementing similar locatorless approach for driving automation we need ref=true option available

Describe the solution you'd like I checked the source code. This is autogenerated code hence might be issue with upstream repo not documenting this option properly which is causing this repo to ignore this option in autogenerated code. If required i can create issue in upstream repo if i know exact root cause.

Additional context Example usage source code in tyoescript

const snapshot = await this.page.locator('body').ariaSnapshot({
            ref: true,
        })

atmnk avatar Apr 28 '25 17:04 atmnk

I see the current playwright version is 1.51.1 supported by this repo. And ariaSnapshot method with ref attrtribute is since 1.52 once we roll up version to 1.52 this should be fixed.

atmnk avatar Apr 28 '25 18:04 atmnk

I'm working on it. Maybe I'll have time this weekend.

https://github.com/canstand/playwright-go/tree/roll-v1.52

canstand avatar Apr 30 '25 01:04 canstand

v0.5200.0 tagged

canstand avatar May 05 '25 13:05 canstand