Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions playwright/accessibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ def __init__(self, channel: Channel) -> None:
self._channel = channel

async def snapshot(
self, interestingOnly: bool = None, root: ElementHandle = None
self, interestingOnly: bool = True, root: ElementHandle = None
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately there is no undefined in Python. So JSON won't keep it out and will treat it in this case as null -> Client side default parameters will be ignored. So we either have our own "Undefined" which will remove the keys in the serialisation or we duplicate the default values.

) -> Dict:
root = root._channel if root else None
return await self._channel.send(
"snapshot", dict(root=root, interestingOnly=interestingOnly)
"accessibilitySnapshot", dict(root=root, interestingOnly=interestingOnly)
)
Loading