@@ -2228,42 +2228,6 @@ async def type(
22282228 )
22292229 )
22302230
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-
22672231 async def press(
22682232 self,
22692233 key: str,
@@ -5575,54 +5539,6 @@ async def set_checked(
55755539 )
55765540 )
55775541
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-
56265542
56275543mapping.register(FrameImpl, Frame)
56285544
@@ -8499,7 +8415,7 @@ async def go_forward(
84998415 async def emulate_media(
85008416 self,
85018417 *,
8502- media: typing.Optional[Literal["print", "screen"]] = None,
8418+ media: typing.Optional[Literal["null", " print", "screen"]] = None,
85038419 color_scheme: typing.Optional[
85048420 Literal["dark", "light", "no-preference", "null"]
85058421 ] = None,
@@ -8544,8 +8460,8 @@ async def emulate_media(
85448460
85458461 Parameters
85468462 ----------
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' `
85498465 disables CSS media emulation.
85508466 color_scheme : Union["dark", "light", "no-preference", "null", None]
85518467 Emulates `'prefers-colors-scheme'` media feature, supported values are `'light'`, `'dark'`, `'no-preference'`. Passing
@@ -9204,55 +9120,6 @@ async def fill(
92049120 )
92059121 )
92069122
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-
92569123 def locator(
92579124 self,
92589125 selector: str,
0 commit comments