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

Method select_text

playwright/async_api/_generated.py:2597–2625  ·  view source on GitHub ↗

ElementHandle.select_text This method waits for [actionability](https://playwright.dev/python/docs/actionability) checks, then focuses the element and selects all its text content. If the element is inside the ` ` element that has an associated [control](https

(
        self,
        *,
        force: typing.Optional[bool] = None,
        timeout: typing.Optional[typing.Union[float, datetime.timedelta]] = None,
    )

Source from the content-addressed store, hash-verified

2595 )
2596
2597 async def select_text(
2598 self,
2599 *,
2600 force: typing.Optional[bool] = None,
2601 timeout: typing.Optional[typing.Union[float, datetime.timedelta]] = None,
2602 ) -> None:
2603 """ElementHandle.select_text
2604
2605 This method waits for [actionability](https://playwright.dev/python/docs/actionability) checks, then focuses the element and selects all its
2606 text content.
2607
2608 If the element is inside the `<label>` element that has an associated
2609 [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), focuses and selects text in
2610 the control instead.
2611
2612 Parameters
2613 ----------
2614 force : Union[bool, None]
2615 Whether to bypass the [actionability](../actionability.md) checks. Defaults to `false`.
2616 timeout : Union[float, None]
2617 Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can
2618 be changed by using the `browser_context.set_default_timeout()` or `page.set_default_timeout()` methods.
2619 """
2620
2621 return mapping.from_maybe_impl(
2622 await self._impl_obj.select_text(
2623 force=force, timeout=to_milliseconds(timeout)
2624 )
2625 )
2626
2627 async def input_value(
2628 self,

Callers

nothing calls this directly

Calls 3

to_millisecondsFunction · 0.90
from_maybe_implMethod · 0.80
select_textMethod · 0.45

Tested by

no test coverage detected