@@ -946,9 +946,12 @@ async def handle(route, request):
946946 `route.continue_()` will immediately send the request to the network, other matching handlers won't be
947947 invoked. Use `route.fallback()` If you want next matching handler in the chain to be invoked.
948948
949- **NOTE** The `Cookie` header cannot be overridden using this method. If a value is provided, it will be ignored,
950- and the cookie will be loaded from the browser's cookie store. To set custom cookies, use
951- `browser_context.add_cookies()`.
949+ **NOTE** Some request headers are **forbidden** and cannot be overridden (for example, `Cookie`, `Host`,
950+ `Content-Length` and others, see
951+ [this MDN page](https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_request_header) for full list). If an
952+ override is provided for a forbidden header, it will be ignored and the original request header will be used.
953+
954+ To set custom cookies, use `browser_context.add_cookies()`.
952955
953956 Parameters
954957 ----------
@@ -7039,6 +7042,7 @@ def type(
70397042 Literal["startGroup"],
70407043 Literal["startGroupCollapsed"],
70417044 Literal["table"],
7045+ Literal["time"],
70427046 Literal["timeEnd"],
70437047 Literal["trace"],
70447048 Literal["warning"],
@@ -7047,7 +7051,7 @@ def type(
70477051
70487052 Returns
70497053 -------
7050- Union["assert", "clear", "count", "debug", "dir", "dirxml", "endGroup", "error", "info", "log", "profile", "profileEnd", "startGroup", "startGroupCollapsed", "table", "timeEnd", "trace", "warning"]
7054+ Union["assert", "clear", "count", "debug", "dir", "dirxml", "endGroup", "error", "info", "log", "profile", "profileEnd", "startGroup", "startGroupCollapsed", "table", "time", " timeEnd", "trace", "warning"]
70517055 """
70527056 return mapping.from_maybe_impl(self._impl_obj.type)
70537057
@@ -14440,7 +14444,6 @@ async def launch(
1444014444 timeout: typing.Optional[float] = None,
1444114445 env: typing.Optional[typing.Dict[str, typing.Union[str, float, bool]]] = None,
1444214446 headless: typing.Optional[bool] = None,
14443- devtools: typing.Optional[bool] = None,
1444414447 proxy: typing.Optional[ProxySettings] = None,
1444514448 downloads_path: typing.Optional[typing.Union[pathlib.Path, str]] = None,
1444614449 slow_mo: typing.Optional[float] = None,
@@ -14514,12 +14517,7 @@ async def launch(
1451414517 headless : Union[bool, None]
1451514518 Whether to run browser in headless mode. More details for
1451614519 [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
14517- [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the
14518- `devtools` option is `true`.
14519- devtools : Union[bool, None]
14520- **Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the
14521- `headless` option will be set `false`.
14522- Deprecated: Use [debugging tools](../debug.md) instead.
14520+ [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true`.
1452314521 proxy : Union[{server: str, bypass: Union[str, None], username: Union[str, None], password: Union[str, None]}, None]
1452414522 Network proxy settings.
1452514523 downloads_path : Union[pathlib.Path, str, None]
@@ -14557,7 +14555,6 @@ async def launch(
1455714555 timeout=timeout,
1455814556 env=mapping.to_impl(env),
1455914557 headless=headless,
14560- devtools=devtools,
1456114558 proxy=proxy,
1456214559 downloadsPath=downloads_path,
1456314560 slowMo=slow_mo,
@@ -14583,7 +14580,6 @@ async def launch_persistent_context(
1458314580 timeout: typing.Optional[float] = None,
1458414581 env: typing.Optional[typing.Dict[str, typing.Union[str, float, bool]]] = None,
1458514582 headless: typing.Optional[bool] = None,
14586- devtools: typing.Optional[bool] = None,
1458714583 proxy: typing.Optional[ProxySettings] = None,
1458814584 downloads_path: typing.Optional[typing.Union[pathlib.Path, str]] = None,
1458914585 slow_mo: typing.Optional[float] = None,
@@ -14691,12 +14687,7 @@ async def launch_persistent_context(
1469114687 headless : Union[bool, None]
1469214688 Whether to run browser in headless mode. More details for
1469314689 [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
14694- [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true` unless the
14695- `devtools` option is `true`.
14696- devtools : Union[bool, None]
14697- **Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the
14698- `headless` option will be set `false`.
14699- Deprecated: Use [debugging tools](../debug.md) instead.
14690+ [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true`.
1470014691 proxy : Union[{server: str, bypass: Union[str, None], username: Union[str, None], password: Union[str, None]}, None]
1470114692 Network proxy settings.
1470214693 downloads_path : Union[pathlib.Path, str, None]
@@ -14858,7 +14849,6 @@ async def launch_persistent_context(
1485814849 timeout=timeout,
1485914850 env=mapping.to_impl(env),
1486014851 headless=headless,
14861- devtools=devtools,
1486214852 proxy=proxy,
1486314853 downloadsPath=downloads_path,
1486414854 slowMo=slow_mo,
@@ -14908,6 +14898,7 @@ async def connect_over_cdp(
1490814898 timeout: typing.Optional[float] = None,
1490914899 slow_mo: typing.Optional[float] = None,
1491014900 headers: typing.Optional[typing.Dict[str, str]] = None,
14901+ is_local: typing.Optional[bool] = None,
1491114902 ) -> "Browser":
1491214903 """BrowserType.connect_over_cdp
1491314904
@@ -14942,6 +14933,9 @@ async def connect_over_cdp(
1494214933 on. Defaults to 0.
1494314934 headers : Union[Dict[str, str], None]
1494414935 Additional HTTP headers to be sent with connect request. Optional.
14936+ is_local : Union[bool, None]
14937+ Tells Playwright that it runs on the same host as the CDP server. It will enable certain optimizations that rely
14938+ upon the file system being the same between Playwright and the Browser.
1494514939
1494614940 Returns
1494714941 -------
@@ -14954,6 +14948,7 @@ async def connect_over_cdp(
1495414948 timeout=timeout,
1495514949 slowMo=slow_mo,
1495614950 headers=mapping.to_impl(headers),
14951+ isLocal=is_local,
1495714952 )
1495814953 )
1495914954
@@ -15397,8 +15392,7 @@ def description(self) -> typing.Optional[str]:
1539715392 """Locator.description
1539815393
1539915394 Returns locator description previously set with `locator.describe()`. Returns `null` if no custom
15400- description has been set. Prefer `Locator.toString()` for a human-readable representation, as it uses the
15401- description when available.
15395+ description has been set.
1540215396
1540315397 **Usage**
1540415398
@@ -19176,7 +19170,7 @@ async def to_contain_text(
1917619170 from playwright.async_api import expect
1917719171
1917819172 # ✓ Contains the right items in the right order
19179- await expect(page.locator(\"ul > li\")).to_contain_text([\"Text 1\", \"Text 3\", \"Text 4\" ])
19173+ await expect(page.locator(\"ul > li\")).to_contain_text([\"Text 1\", \"Text 3\"])
1918019174
1918119175 # ✖ Wrong order
1918219176 await expect(page.locator(\"ul > li\")).to_contain_text([\"Text 3\", \"Text 2\"])
0 commit comments