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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Playwright is a Python library to automate [Chromium](https://www.chromium.org/H

| | Linux | macOS | Windows |
| :--- | :---: | :---: | :---: |
| Chromium <!-- GEN:chromium-version -->96.0.4641.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Chromium <!-- GEN:chromium-version -->96.0.4652.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| WebKit <!-- GEN:webkit-version -->15.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Firefox <!-- GEN:firefox-version -->92.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |

Expand Down
2 changes: 1 addition & 1 deletion playwright/_impl/_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ async def uncheck(
await self._channel.send("uncheck", locals_to_params(locals()))

async def wait_for_timeout(self, timeout: float) -> None:
await self._connection._loop.create_task(asyncio.sleep(timeout / 1000))
await self._channel.send("waitForTimeout", locals_to_params(locals()))

async def wait_for_function(
self,
Expand Down
28 changes: 18 additions & 10 deletions playwright/async_api/_generated.py
Original file line number Diff line number Diff line change
Expand Up @@ -3104,7 +3104,9 @@ def expect_navigation(
Parameters
----------
url : Union[Callable[[str], bool], Pattern, str, NoneType]
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if the
parameter is a string without wilcard characters, the method will wait for navigation to URL that is exactly equal to
the string.
wait_until : Union["domcontentloaded", "load", "networkidle", NoneType]
When to consider operation succeeded, defaults to `load`. Events can be either:
- `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
Expand Down Expand Up @@ -3146,7 +3148,9 @@ async def wait_for_url(
Parameters
----------
url : Union[Callable[[str], bool], Pattern, str]
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if the
parameter is a string without wilcard characters, the method will wait for navigation to URL that is exactly equal to
the string.
wait_until : Union["domcontentloaded", "load", "networkidle", NoneType]
When to consider operation succeeded, defaults to `load`. Events can be either:
- `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
Expand Down Expand Up @@ -7430,7 +7434,9 @@ async def wait_for_url(
Parameters
----------
url : Union[Callable[[str], bool], Pattern, str]
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if the
parameter is a string without wilcard characters, the method will wait for navigation to URL that is exactly equal to
the string.
wait_until : Union["domcontentloaded", "load", "networkidle", NoneType]
When to consider operation succeeded, defaults to `load`. Events can be either:
- `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
Expand Down Expand Up @@ -9398,7 +9404,9 @@ def expect_navigation(
Parameters
----------
url : Union[Callable[[str], bool], Pattern, str, NoneType]
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if the
parameter is a string without wilcard characters, the method will wait for navigation to URL that is exactly equal to
the string.
wait_until : Union["domcontentloaded", "load", "networkidle", NoneType]
When to consider operation succeeded, defaults to `load`. Events can be either:
- `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
Expand Down Expand Up @@ -10872,7 +10880,7 @@ async def new_context(
no_viewport : Union[bool, NoneType]
Does not enforce fixed viewport, allows resizing window in the headed mode.
ignore_https_errors : Union[bool, NoneType]
Whether to ignore HTTPS errors during navigation. Defaults to `false`.
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
java_script_enabled : Union[bool, NoneType]
Whether or not to enable JavaScript in the context. Defaults to `true`.
bypass_csp : Union[bool, NoneType]
Expand All @@ -10891,7 +10899,7 @@ async def new_context(
A list of permissions to grant to all pages in this context. See `browser_context.grant_permissions()` for more
details.
extra_http_headers : Union[Dict[str, str], NoneType]
An object containing additional HTTP headers to be sent with every request. All header values must be strings.
An object containing additional HTTP headers to be sent with every request.
offline : Union[bool, NoneType]
Whether to emulate network being offline. Defaults to `false`.
http_credentials : Union[{username: str, password: str}, NoneType]
Expand Down Expand Up @@ -11046,7 +11054,7 @@ async def new_page(
no_viewport : Union[bool, NoneType]
Does not enforce fixed viewport, allows resizing window in the headed mode.
ignore_https_errors : Union[bool, NoneType]
Whether to ignore HTTPS errors during navigation. Defaults to `false`.
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
java_script_enabled : Union[bool, NoneType]
Whether or not to enable JavaScript in the context. Defaults to `true`.
bypass_csp : Union[bool, NoneType]
Expand All @@ -11065,7 +11073,7 @@ async def new_page(
A list of permissions to grant to all pages in this context. See `browser_context.grant_permissions()` for more
details.
extra_http_headers : Union[Dict[str, str], NoneType]
An object containing additional HTTP headers to be sent with every request. All header values must be strings.
An object containing additional HTTP headers to be sent with every request.
offline : Union[bool, NoneType]
Whether to emulate network being offline. Defaults to `false`.
http_credentials : Union[{username: str, password: str}, NoneType]
Expand Down Expand Up @@ -11539,7 +11547,7 @@ async def launch_persistent_context(
no_viewport : Union[bool, NoneType]
Does not enforce fixed viewport, allows resizing window in the headed mode.
ignore_https_errors : Union[bool, NoneType]
Whether to ignore HTTPS errors during navigation. Defaults to `false`.
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
java_script_enabled : Union[bool, NoneType]
Whether or not to enable JavaScript in the context. Defaults to `true`.
bypass_csp : Union[bool, NoneType]
Expand All @@ -11558,7 +11566,7 @@ async def launch_persistent_context(
A list of permissions to grant to all pages in this context. See `browser_context.grant_permissions()` for more
details.
extra_http_headers : Union[Dict[str, str], NoneType]
An object containing additional HTTP headers to be sent with every request. All header values must be strings.
An object containing additional HTTP headers to be sent with every request.
offline : Union[bool, NoneType]
Whether to emulate network being offline. Defaults to `false`.
http_credentials : Union[{username: str, password: str}, NoneType]
Expand Down
28 changes: 18 additions & 10 deletions playwright/sync_api/_generated.py
Original file line number Diff line number Diff line change
Expand Up @@ -3053,7 +3053,9 @@ def expect_navigation(
Parameters
----------
url : Union[Callable[[str], bool], Pattern, str, NoneType]
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if the
parameter is a string without wilcard characters, the method will wait for navigation to URL that is exactly equal to
the string.
wait_until : Union["domcontentloaded", "load", "networkidle", NoneType]
When to consider operation succeeded, defaults to `load`. Events can be either:
- `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
Expand Down Expand Up @@ -3095,7 +3097,9 @@ def wait_for_url(
Parameters
----------
url : Union[Callable[[str], bool], Pattern, str]
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if the
parameter is a string without wilcard characters, the method will wait for navigation to URL that is exactly equal to
the string.
wait_until : Union["domcontentloaded", "load", "networkidle", NoneType]
When to consider operation succeeded, defaults to `load`. Events can be either:
- `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
Expand Down Expand Up @@ -7246,7 +7250,9 @@ def wait_for_url(
Parameters
----------
url : Union[Callable[[str], bool], Pattern, str]
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if the
parameter is a string without wilcard characters, the method will wait for navigation to URL that is exactly equal to
the string.
wait_until : Union["domcontentloaded", "load", "networkidle", NoneType]
When to consider operation succeeded, defaults to `load`. Events can be either:
- `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
Expand Down Expand Up @@ -9206,7 +9212,9 @@ def expect_navigation(
Parameters
----------
url : Union[Callable[[str], bool], Pattern, str, NoneType]
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation.
A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if the
parameter is a string without wilcard characters, the method will wait for navigation to URL that is exactly equal to
the string.
wait_until : Union["domcontentloaded", "load", "networkidle", NoneType]
When to consider operation succeeded, defaults to `load`. Events can be either:
- `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
Expand Down Expand Up @@ -10619,7 +10627,7 @@ def new_context(
no_viewport : Union[bool, NoneType]
Does not enforce fixed viewport, allows resizing window in the headed mode.
ignore_https_errors : Union[bool, NoneType]
Whether to ignore HTTPS errors during navigation. Defaults to `false`.
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
java_script_enabled : Union[bool, NoneType]
Whether or not to enable JavaScript in the context. Defaults to `true`.
bypass_csp : Union[bool, NoneType]
Expand All @@ -10638,7 +10646,7 @@ def new_context(
A list of permissions to grant to all pages in this context. See `browser_context.grant_permissions()` for more
details.
extra_http_headers : Union[Dict[str, str], NoneType]
An object containing additional HTTP headers to be sent with every request. All header values must be strings.
An object containing additional HTTP headers to be sent with every request.
offline : Union[bool, NoneType]
Whether to emulate network being offline. Defaults to `false`.
http_credentials : Union[{username: str, password: str}, NoneType]
Expand Down Expand Up @@ -10793,7 +10801,7 @@ def new_page(
no_viewport : Union[bool, NoneType]
Does not enforce fixed viewport, allows resizing window in the headed mode.
ignore_https_errors : Union[bool, NoneType]
Whether to ignore HTTPS errors during navigation. Defaults to `false`.
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
java_script_enabled : Union[bool, NoneType]
Whether or not to enable JavaScript in the context. Defaults to `true`.
bypass_csp : Union[bool, NoneType]
Expand All @@ -10812,7 +10820,7 @@ def new_page(
A list of permissions to grant to all pages in this context. See `browser_context.grant_permissions()` for more
details.
extra_http_headers : Union[Dict[str, str], NoneType]
An object containing additional HTTP headers to be sent with every request. All header values must be strings.
An object containing additional HTTP headers to be sent with every request.
offline : Union[bool, NoneType]
Whether to emulate network being offline. Defaults to `false`.
http_credentials : Union[{username: str, password: str}, NoneType]
Expand Down Expand Up @@ -11286,7 +11294,7 @@ def launch_persistent_context(
no_viewport : Union[bool, NoneType]
Does not enforce fixed viewport, allows resizing window in the headed mode.
ignore_https_errors : Union[bool, NoneType]
Whether to ignore HTTPS errors during navigation. Defaults to `false`.
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
java_script_enabled : Union[bool, NoneType]
Whether or not to enable JavaScript in the context. Defaults to `true`.
bypass_csp : Union[bool, NoneType]
Expand All @@ -11305,7 +11313,7 @@ def launch_persistent_context(
A list of permissions to grant to all pages in this context. See `browser_context.grant_permissions()` for more
details.
extra_http_headers : Union[Dict[str, str], NoneType]
An object containing additional HTTP headers to be sent with every request. All header values must be strings.
An object containing additional HTTP headers to be sent with every request.
offline : Union[bool, NoneType]
Whether to emulate network being offline. Defaults to `false`.
http_credentials : Union[{username: str, password: str}, NoneType]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
InWheel = None
from wheel.bdist_wheel import bdist_wheel as BDistWheelCommand

driver_version = "1.16.0-next-1631799458000"
driver_version = "1.16.0-next-1632717011000"


def extractall(zip: zipfile.ZipFile, path: str) -> None:
Expand Down
4 changes: 2 additions & 2 deletions tests/async/test_element_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,12 +551,12 @@ async def test_inner_text_should_throw(page, server):
await page.set_content("<svg>text</svg>")
with pytest.raises(Error) as exc_info1:
await page.inner_text("svg")
assert "Not an HTMLElement" in exc_info1.value.message
assert " Node is not an HTMLElement" in exc_info1.value.message

handle = await page.query_selector("svg")
with pytest.raises(Error) as exc_info2:
await handle.inner_text()
assert "Not an HTMLElement" in exc_info2.value.message
assert " Node is not an HTMLElement" in exc_info2.value.message


async def test_text_content(page, server):
Expand Down
2 changes: 1 addition & 1 deletion tests/async/test_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ async def test_select_option_should_throw_when_element_is_not_a__select_(page, s
await page.goto(server.PREFIX + "/input/select.html")
with pytest.raises(Error) as exc_info:
await page.select_option("body", "")
assert "Element is not a <select> element." in exc_info.value.message
assert "Element is not a <select> element" in exc_info.value.message


async def test_select_option_should_return_on_no_matched_values(page, server):
Expand Down
4 changes: 2 additions & 2 deletions tests/sync/test_element_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,13 +511,13 @@ def test_inner_text_should_throw(page: Page) -> None:
page.set_content("<svg>text</svg>")
with pytest.raises(Error) as exc_info1:
page.inner_text("svg")
assert "Not an HTMLElement" in exc_info1.value.message
assert " Node is not an HTMLElement" in exc_info1.value.message

handle = page.query_selector("svg")
assert handle
with pytest.raises(Error) as exc_info2:
handle.inner_text()
assert "Not an HTMLElement" in exc_info2.value.message
assert " Node is not an HTMLElement" in exc_info2.value.message


def test_text_content(page: Page, server: Server) -> None:
Expand Down