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

Method dblclick

playwright/async_api/_generated.py:10917–10994  ·  view source on GitHub ↗

Page.dblclick This method double clicks an element matching `selector` by performing the following steps: 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM. 1. Wait for [actionability](https://playwright.dev/python

(
        self,
        selector: str,
        *,
        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,
        strict: typing.Optional[bool] = None,
        trial: typing.Optional[bool] = None,
    )

Source from the content-addressed store, hash-verified

10915 )
10916
10917 async def dblclick(
10918 self,
10919 selector: str,
10920 *,
10921 modifiers: typing.Optional[
10922 typing.Sequence[Literal["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]]
10923 ] = None,
10924 position: typing.Optional[Position] = None,
10925 delay: typing.Optional[float] = None,
10926 button: typing.Optional[Literal["left", "middle", "right"]] = None,
10927 timeout: typing.Optional[typing.Union[float, datetime.timedelta]] = None,
10928 force: typing.Optional[bool] = None,
10929 no_wait_after: typing.Optional[bool] = None,
10930 strict: typing.Optional[bool] = None,
10931 trial: typing.Optional[bool] = None,
10932 ) -> None:
10933 """Page.dblclick
10934
10935 This method double clicks an element matching `selector` by performing the following steps:
10936 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
10937 1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
10938 the element is detached during the checks, the whole action is retried.
10939 1. Scroll the element into view if needed.
10940 1. Use `page.mouse` to double click in the center of the element, or the specified `position`.
10941
10942 When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
10943 Passing zero timeout disables this.
10944
10945 **NOTE** `page.dblclick()` dispatches two `click` events and a single `dblclick` event.
10946
10947 Parameters
10948 ----------
10949 selector : str
10950 A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
10951 used.
10952 modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
10953 Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
10954 current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
10955 "Control" on Windows and Linux and to "Meta" on macOS.
10956 position : Union[{x: float, y: float}, None]
10957 A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
10958 the element.
10959 delay : Union[float, None]
10960 Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
10961 button : Union["left", "middle", "right", None]
10962 Defaults to `left`.
10963 timeout : Union[float, None]
10964 Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
10965 be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
10966 force : Union[bool, None]
10967 Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
10968 no_wait_after : Union[bool, None]
10969 This option has no effect.
10970 Deprecated: This option has no effect.
10971 strict : Union[bool, None]
10972 When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
10973 element, the call throws an exception.
10974 trial : Union[bool, None]

Callers 4

dblclickMethod · 0.45
dblclickMethod · 0.45
dblclickMethod · 0.45
dblclickMethod · 0.45

Calls 3

to_millisecondsFunction · 0.90
from_maybe_implMethod · 0.80
to_implMethod · 0.80

Tested by

no test coverage detected