|
| None | to_have_title (self, typing.Union[typing.Pattern[str], str] title_or_reg_exp, *typing.Optional[float] timeout=None) |
| |
| None | not_to_have_title (self, typing.Union[typing.Pattern[str], str] title_or_reg_exp, *typing.Optional[float] timeout=None) |
| |
| None | to_have_url (self, typing.Union[str, typing.Pattern[str]] url_or_reg_exp, *typing.Optional[float] timeout=None, typing.Optional[bool] ignore_case=None) |
| |
| None | not_to_have_url (self, typing.Union[typing.Pattern[str], str] url_or_reg_exp, *typing.Optional[float] timeout=None, typing.Optional[bool] ignore_case=None) |
| |
| None | __init__ (self, Any impl_obj) |
| |
|
str | __str__ (self) |
| |
| None | on (self, Any event, Any f) |
| |
| None | once (self, Any event, Any f) |
| |
| None | remove_listener (self, Any event, Any f) |
| |
|
str | __repr__ (self) |
| |
|
|
Callable[..., None] | _wrap_handler (self, Union[Callable[..., Any], Any] handler) |
| |
|
| _loop |
| |
|
| _impl_obj |
| |
◆ not_to_have_title()
| None playwright.async_api._generated.PageAssertions.not_to_have_title |
( |
|
self, |
|
|
typing.Union[typing.Pattern[str], str] |
title_or_reg_exp, |
|
|
*typing.Optional[float] |
timeout = None |
|
) |
| |
PageAssertions.not_to_have_title
The opposite of `page_assertions.to_have_title()`.
Parameters
----------
title_or_reg_exp : Union[Pattern[str], str]
Expected title or RegExp.
timeout : Union[float, None]
Time to retry the assertion for in milliseconds. Defaults to `5000`.
◆ not_to_have_url()
| None playwright.async_api._generated.PageAssertions.not_to_have_url |
( |
|
self, |
|
|
typing.Union[typing.Pattern[str], str] |
url_or_reg_exp, |
|
|
*typing.Optional[float] |
timeout = None, |
|
|
typing.Optional[bool] |
ignore_case = None |
|
) |
| |
PageAssertions.not_to_have_url
The opposite of `page_assertions.to_have_url()`.
Parameters
----------
url_or_reg_exp : Union[Pattern[str], str]
Expected URL string or RegExp.
timeout : Union[float, None]
Time to retry the assertion for in milliseconds. Defaults to `5000`.
ignore_case : Union[bool, None]
Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
expression flag if specified.
◆ to_have_title()
| None playwright.async_api._generated.PageAssertions.to_have_title |
( |
|
self, |
|
|
typing.Union[typing.Pattern[str], str] |
title_or_reg_exp, |
|
|
*typing.Optional[float] |
timeout = None |
|
) |
| |
PageAssertions.to_have_title
Ensures the page has the given title.
**Usage**
```py
import re
from playwright.async_api import expect
# ...
await expect(page).to_have_title(re.compile(r\".*checkout\"))
```
Parameters
----------
title_or_reg_exp : Union[Pattern[str], str]
Expected title or RegExp.
timeout : Union[float, None]
Time to retry the assertion for in milliseconds. Defaults to `5000`.
◆ to_have_url()
| None playwright.async_api._generated.PageAssertions.to_have_url |
( |
|
self, |
|
|
typing.Union[str, typing.Pattern[str]] |
url_or_reg_exp, |
|
|
*typing.Optional[float] |
timeout = None, |
|
|
typing.Optional[bool] |
ignore_case = None |
|
) |
| |
PageAssertions.to_have_url
Ensures the page is navigated to the given URL.
**Usage**
```py
import re
from playwright.async_api import expect
# ...
await expect(page).to_have_url(re.compile(\".*checkout\"))
```
Parameters
----------
url_or_reg_exp : Union[Pattern[str], str]
Expected URL string or RegExp.
timeout : Union[float, None]
Time to retry the assertion for in milliseconds. Defaults to `5000`.
ignore_case : Union[bool, None]
Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
expression parameter if specified. A provided predicate ignores this flag.
The documentation for this class was generated from the following file:
- docs/help/help-venv/lib/python3.12/site-packages/playwright/async_api/_generated.py