rename accessibilitySnapshot to snapshot for shorter agent usage
The function is now exposed as `snapshot()` in the executor sandbox scope. `accessibilitySnapshot` remains as a backward-compatible alias pointing to the same function, so existing agents and saved commands continue to work. Updated all code examples across skill.md, README, PLAYWRITER_AGENTS, docs, tests, and the extension welcome page to use the shorter name.
This commit is contained in:
@@ -325,7 +325,7 @@ playwriter session new
|
||||
# navigate to a URL
|
||||
playwriter -s 1 -e "await page.goto('https://example.com')"
|
||||
# get the accessibility tree of the page
|
||||
playwriter -s 1 -e "console.log(await accessibilitySnapshot({ page }))"
|
||||
playwriter -s 1 -e "console.log(await snapshot({ page }))"
|
||||
# click an element by its accessibility reference
|
||||
playwriter -s 1 -e "await page.locator('aria-ref=e5').click()"</code></pre>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user