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

Method dblclick

playwright/async_api/_generated.py:4531–4609  ·  view source on GitHub ↗

Frame.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/pytho

(
        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

4529 )
4530
4531 async def dblclick(
4532 self,
4533 selector: str,
4534 *,
4535 modifiers: typing.Optional[
4536 typing.Sequence[Literal["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]]
4537 ] = None,
4538 position: typing.Optional[Position] = None,
4539 delay: typing.Optional[float] = None,
4540 button: typing.Optional[Literal["left", "middle", "right"]] = None,
4541 timeout: typing.Optional[typing.Union[float, datetime.timedelta]] = None,
4542 force: typing.Optional[bool] = None,
4543 no_wait_after: typing.Optional[bool] = None,
4544 strict: typing.Optional[bool] = None,
4545 trial: typing.Optional[bool] = None,
4546 ) -> None:
4547 """Frame.dblclick
4548
4549 This method double clicks an element matching `selector` by performing the following steps:
4550 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
4551 1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the matched element, unless `force` option is set. If
4552 the element is detached during the checks, the whole action is retried.
4553 1. Scroll the element into view if needed.
4554 1. Use `page.mouse` to double click in the center of the element, or the specified `position`. if
4555 the first click of the `dblclick()` triggers a navigation event, this method will throw.
4556
4557 When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
4558 Passing zero timeout disables this.
4559
4560 **NOTE** `frame.dblclick()` dispatches two `click` events and a single `dblclick` event.
4561
4562 Parameters
4563 ----------
4564 selector : str
4565 A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4566 used.
4567 modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
4568 Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
4569 current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
4570 "Control" on Windows and Linux and to "Meta" on macOS.
4571 position : Union[{x: float, y: float}, None]
4572 A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
4573 the element.
4574 delay : Union[float, None]
4575 Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
4576 button : Union["left", "middle", "right", None]
4577 Defaults to `left`.
4578 timeout : Union[float, None]
4579 Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
4580 be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
4581 force : Union[bool, None]
4582 Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
4583 no_wait_after : Union[bool, None]
4584 This option has no effect.
4585 Deprecated: This option has no effect.
4586 strict : Union[bool, None]
4587 When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4588 element, the call throws an exception.

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