Skip to content

chore: better type validation #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2020
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
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ repos:
- id: end-of-file-fixer
exclude: ^playwright/drivers/browsers.json$
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
Expand Down
16,493 changes: 16,493 additions & 0 deletions api.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion driver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"playwright": "1.2.0-next.1596080705875"
"playwright": "1.2.0-next.1596151449209"
},
"devDependencies": {
"pkg": "^4.4.9"
Expand Down
7 changes: 4 additions & 3 deletions playwright/accessibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

from playwright.connection import Channel
from playwright.element_handle import ElementHandle
from playwright.helper import locals_to_params


def _ax_node_from_protocol(axNode: Dict[str, Any]) -> Dict[str, Any]:
Expand Down Expand Up @@ -58,10 +59,10 @@ def __init__(self, channel: Channel) -> None:
self._loop = channel._connection._loop

async def snapshot(
self, interestingOnly: bool = True, root: ElementHandle = None
self, interestingOnly: bool = None, root: ElementHandle = None
) -> Optional[Dict[str, Any]]:
params = {"interestingOnly": interestingOnly}
params = locals_to_params(locals())
if root:
params["root"] = root._channel
result = await self._channel.send("accessibilitySnapshot", params,)
result = await self._channel.send("accessibilitySnapshot", params)
return _ax_node_from_protocol(result) if result else None
Loading