Closed
Description
🚀 Feature Request
Title: Feature Request: Support for ref
options in aria_snapshot
(API parity with Node.js)
Request:
- Please consider adding support for the
ref
option (and any other relevant options) to thearia_snapshot
method in Playwright for Python, to achieve API parity with the Node.js version. - Alternatively, please update the documentation to clarify the differences and current limitations between the Node.js and Python APIs for ARIA snapshotting.
Thank you
Example
Description:
In Playwright for Node.js, it is possible to use the following code to obtain an ARIA snapshot with additional options:
await page.locator('body').ariaSnapshot({ ref: true});
However, when attempting to use similar options in Playwright for Python:
snapshot = await page.locator("body").aria_snapshot(ref=True)
I receive the following error:
TypeError: Locator.aria_snapshot() got an unexpected keyword argument 'ref'
Motivation
Motivation:
- Consistent APIs across Playwright languages make it easier for users to migrate code and share knowledge.
- The additional options are useful for advanced accessibility testing and automation.
Metadata
Metadata
Assignees
Labels
No labels