@@ -2228,42 +2228,6 @@ async def type(
2228
2228
)
2229
2229
)
2230
2230
2231
- async def clear(
2232
- self,
2233
- *,
2234
- timeout: typing.Optional[float] = None,
2235
- no_wait_after: typing.Optional[bool] = None,
2236
- force: typing.Optional[bool] = None
2237
- ) -> None:
2238
- """ElementHandle.clear
2239
-
2240
- This method waits for [actionability](https://playwright.dev/python/docs/actionability) checks, focuses the element, clears it and triggers an
2241
- `input` event after clearing.
2242
-
2243
- If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an error.
2244
- However, if the element is inside the `<label>` element that has an associated
2245
- [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be cleared
2246
- instead.
2247
-
2248
- Parameters
2249
- ----------
2250
- timeout : Union[float, None]
2251
- Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by
2252
- using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
2253
- no_wait_after : Union[bool, None]
2254
- Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
2255
- opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
2256
- inaccessible pages. Defaults to `false`.
2257
- force : Union[bool, None]
2258
- Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
2259
- """
2260
-
2261
- return mapping.from_maybe_impl(
2262
- await self._impl_obj.clear(
2263
- timeout=timeout, noWaitAfter=no_wait_after, force=force
2264
- )
2265
- )
2266
-
2267
2231
async def press(
2268
2232
self,
2269
2233
key: str,
@@ -5575,54 +5539,6 @@ async def set_checked(
5575
5539
)
5576
5540
)
5577
5541
5578
- async def clear(
5579
- self,
5580
- selector: str,
5581
- *,
5582
- timeout: typing.Optional[float] = None,
5583
- no_wait_after: typing.Optional[bool] = None,
5584
- force: typing.Optional[bool] = None,
5585
- strict: typing.Optional[bool] = None
5586
- ) -> None:
5587
- """Frame.clear
5588
-
5589
- This method waits for an element matching `selector`, waits for [actionability](https://playwright.dev/python/docs/actionability) checks, focuses the
5590
- element, clears it and triggers an `input` event after clearing.
5591
-
5592
- If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an error.
5593
- However, if the element is inside the `<label>` element that has an associated
5594
- [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be cleared
5595
- instead.
5596
-
5597
- Parameters
5598
- ----------
5599
- selector : str
5600
- A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. See
5601
- [working with selectors](../selectors.md) for more details.
5602
- timeout : Union[float, None]
5603
- Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by
5604
- using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
5605
- no_wait_after : Union[bool, None]
5606
- Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
5607
- opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
5608
- inaccessible pages. Defaults to `false`.
5609
- force : Union[bool, None]
5610
- Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
5611
- strict : Union[bool, None]
5612
- When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
5613
- element, the call throws an exception.
5614
- """
5615
-
5616
- return mapping.from_maybe_impl(
5617
- await self._impl_obj.clear(
5618
- selector=selector,
5619
- timeout=timeout,
5620
- noWaitAfter=no_wait_after,
5621
- force=force,
5622
- strict=strict,
5623
- )
5624
- )
5625
-
5626
5542
5627
5543
mapping.register(FrameImpl, Frame)
5628
5544
@@ -8499,7 +8415,7 @@ async def go_forward(
8499
8415
async def emulate_media(
8500
8416
self,
8501
8417
*,
8502
- media: typing.Optional[Literal["print", "screen"]] = None,
8418
+ media: typing.Optional[Literal["null", " print", "screen"]] = None,
8503
8419
color_scheme: typing.Optional[
8504
8420
Literal["dark", "light", "no-preference", "null"]
8505
8421
] = None,
@@ -8544,8 +8460,8 @@ async def emulate_media(
8544
8460
8545
8461
Parameters
8546
8462
----------
8547
- media : Union["print", "screen", None]
8548
- Changes the CSS media type of the page. The only allowed values are `'screen '`, `'print '` and `null `. Passing `null `
8463
+ media : Union["null", " print", "screen", None]
8464
+ Changes the CSS media type of the page. The only allowed values are `'Screen '`, `'Print '` and `'Null' `. Passing `'Null' `
8549
8465
disables CSS media emulation.
8550
8466
color_scheme : Union["dark", "light", "no-preference", "null", None]
8551
8467
Emulates `'prefers-colors-scheme'` media feature, supported values are `'light'`, `'dark'`, `'no-preference'`. Passing
@@ -9204,55 +9120,6 @@ async def fill(
9204
9120
)
9205
9121
)
9206
9122
9207
- async def clear(
9208
- self,
9209
- selector: str,
9210
- *,
9211
- timeout: typing.Optional[float] = None,
9212
- no_wait_after: typing.Optional[bool] = None,
9213
- force: typing.Optional[bool] = None,
9214
- strict: typing.Optional[bool] = None
9215
- ) -> None:
9216
- """Page.clear
9217
-
9218
- This method waits for an element matching `selector`, waits for [actionability](https://playwright.dev/python/docs/actionability) checks, focuses the
9219
- element, clears it and triggers an `input` event after clearing. Note that you can pass an empty string to clear the
9220
- input field.
9221
-
9222
- If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an error.
9223
- However, if the element is inside the `<label>` element that has an associated
9224
- [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be cleared
9225
- instead.
9226
-
9227
- Parameters
9228
- ----------
9229
- selector : str
9230
- A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. See
9231
- [working with selectors](../selectors.md) for more details.
9232
- timeout : Union[float, None]
9233
- Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by
9234
- using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
9235
- no_wait_after : Union[bool, None]
9236
- Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
9237
- opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
9238
- inaccessible pages. Defaults to `false`.
9239
- force : Union[bool, None]
9240
- Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
9241
- strict : Union[bool, None]
9242
- When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
9243
- element, the call throws an exception.
9244
- """
9245
-
9246
- return mapping.from_maybe_impl(
9247
- await self._impl_obj.clear(
9248
- selector=selector,
9249
- timeout=timeout,
9250
- noWaitAfter=no_wait_after,
9251
- force=force,
9252
- strict=strict,
9253
- )
9254
- )
9255
-
9256
9123
def locator(
9257
9124
self,
9258
9125
selector: str,
0 commit comments