MCPcopy
hub / github.com/microsoft/playwright-python / dblclick

Method dblclick

playwright/async_api/_generated.py:2347–2417  ·  view source on GitHub ↗

ElementHandle.dblclick 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. 1. Scroll the element into view if needed.

(
        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

2345 )
2346
2347 async def dblclick(
2348 self,
2349 *,
2350 modifiers: typing.Optional[
2351 typing.Sequence[Literal["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]]
2352 ] = None,
2353 position: typing.Optional[Position] = None,
2354 delay: typing.Optional[float] = None,
2355 button: typing.Optional[Literal["left", "middle", "right"]] = None,
2356 timeout: typing.Optional[typing.Union[float, datetime.timedelta]] = None,
2357 force: typing.Optional[bool] = None,
2358 no_wait_after: typing.Optional[bool] = None,
2359 trial: typing.Optional[bool] = None,
2360 steps: typing.Optional[int] = None,
2361 ) -> None:
2362 """ElementHandle.dblclick
2363
2364 This method double clicks the element by performing the following steps:
2365 1. Wait for [actionability](https://playwright.dev/python/docs/actionability) checks on the element, unless `force` option is set.
2366 1. Scroll the element into view if needed.
2367 1. Use `page.mouse` to double click in the center of the element, or the specified `position`.
2368
2369 If the element is detached from the DOM at any moment during the action, this method throws.
2370
2371 When all steps combined have not finished during the specified `timeout`, this method throws a `TimeoutError`.
2372 Passing zero timeout disables this.
2373
2374 **NOTE** `elementHandle.dblclick()` dispatches two `click` events and a single `dblclick` event.
2375
2376 Parameters
2377 ----------
2378 modifiers : Union[Sequence[Union["Alt", "Control", "ControlOrMeta", "Meta", "Shift"]], None]
2379 Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
2380 current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
2381 "Control" on Windows and Linux and to "Meta" on macOS.
2382 position : Union[{x: float, y: float}, None]
2383 A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
2384 the element.
2385 delay : Union[float, None]
2386 Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
2387 button : Union["left", "middle", "right", None]
2388 Defaults to `left`.
2389 timeout : Union[float, None]
2390 Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
2391 be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
2392 force : Union[bool, None]
2393 Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
2394 no_wait_after : Union[bool, None]
2395 This option has no effect.
2396 Deprecated: This option has no effect.
2397 trial : Union[bool, None]
2398 When set, this method only performs the [actionability](../actionability.md) checks and skips the action. Defaults
2399 to `false`. Useful to wait until the element is ready for the action without performing it.
2400 steps : Union[int, None]
2401 Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
2402 position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
2403 """
2404

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