You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Types the specified text as if it were entered on a keyboard.
305
317
318
+
If `locator` is provided, it will first click on the element to give it focus before typing.
319
+
If `clear` is `True` (default), it will triple click on the element to select the current text (in multi-line inputs like textareas the current line or paragraph) before typing.
320
+
321
+
**IMPORTANT:** `clear` only works if a `locator` is provided.
322
+
306
323
Args:
307
324
text (str): The text to be typed. Must be at least `1` character long.
325
+
locator (str | Locator | None, optional): The identifier or description of the element (e.g., input field) to type into. If `None`, types at the current focus.
326
+
model (ModelComposition | str | None, optional): The composition or name of the model(s) to be used for locating the element, i.e., input field, to type into using the `locator`.
327
+
clear (bool, optional): Whether to triple click on the element to give it focus and select the current text before typing. Defaults to `True`.
0 commit comments