MCPcopy Index your code
hub / github.com/microsoft/playwright-python / dblclick

Method dblclick

playwright/async_api/_generated.py:17706–17782  ·  view source on GitHub ↗

Locator.dblclick Double-click an element. **Details** This method double clicks the element by performing the following steps: 1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.

(
        self,
        *,
        modifiers: typing.Optional[
            typing.Sequence[Literal["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]]
        ] = None,
        position: typing.Optional[Position] = None,
        delay: typing.Optional[float] = None,
        button: typing.Optional[Literal["left", "middle", "right"]] = None,
        timeout: typing.Optional[typing.Union[float, datetime.timedelta]] = None,
        force: typing.Optional[bool] = None,
        no_wait_after: typing.Optional[bool] = None,
        trial: typing.Optional[bool] = None,
        steps: typing.Optional[int] = None,
    )

Source from the content-addressed store, hash-verified

17704 )
17705
17706 async def dblclick(
17707 self,
17708 *,
17709 modifiers: typing.Optional[
17710 typing.Sequence[Literal["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]]
17711 ] = None,
17712 position: typing.Optional[Position] = None,
17713 delay: typing.Optional[float] = None,
17714 button: typing.Optional[Literal["left", "middle", "right"]] = None,
17715 timeout: typing.Optional[typing.Union[float, datetime.timedelta]] = None,
17716 force: typing.Optional[bool] = None,
17717 no_wait_after: typing.Optional[bool] = None,
17718 trial: typing.Optional[bool] = None,
17719 steps: typing.Optional[int] = None,
17720 ) -> None:
17721 """Locator.dblclick
17722
17723 Double-click an element.
17724
17725 **Details**
17726
17727 This method double clicks the element by performing the following steps:
17728 1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.
17729 1. Scroll the element into view if needed.
17730 1. Use `page.mouse` to double click in the center of the element, or the specified `position`.
17731
17732 If the element is detached from the DOM at any moment during the action, this method throws.
17733
17734 When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
17735 Passing zero timeout disables this.
17736
17737 **NOTE** `element.dblclick()` dispatches two `click` events and a single `dblclick` event.
17738
17739 Parameters
17740 ----------
17741 modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
17742 Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
17743 current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
17744 "Control" on Windows and Linux and to "Meta" on macOS.
17745 position : Union[{x: float, y: float}, None]
17746 A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
17747 the element.
17748 delay : Union[float, None]
17749 Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
17750 button : Union["left", "middle", "right", None]
17751 Defaults to `left`.
17752 timeout : Union[float, None]
17753 Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
17754 be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
17755 force : Union[bool, None]
17756 Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
17757 no_wait_after : Union[bool, None]
17758 This option has no effect.
17759 Deprecated: This option has no effect.
17760 trial : Union[bool, None]
17761 When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
17762 to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
17763 `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys

Callers

nothing calls this directly

Calls 4

to_millisecondsFunction · 0.90
from_maybe_implMethod · 0.80
to_implMethod · 0.80
dblclickMethod · 0.45

Tested by

no test coverage detected