Skip to content

TextBox

flaui.core.automation_elements.TextBox

Bases: AutomationElement

Class to interact with a textbox element.

is_read_only property

Gets if the element is read only or not.

Returns:

Type Description
bool

True if element is read only else False

text property writable

Gets the text of the element.

Returns:

Type Description
str

Element text

enter(value, post_wait=None)

Simulate typing in text. This is slower than setting Text but raises more events.

Parameters:

Name Type Description Default
value str

Value to enter in the element

required
post_wait Optional[Union[bool, float, Callable[[], None]]]

Optional wait after operation. True=100ms, float=custom seconds, callable=custom function

None
Source code in flaui/core/automation_elements.py
@handle_csharp_exceptions
def enter(self, value: str, post_wait: Optional[Union[bool, float, Callable[[], None]]] = None):
    """Simulate typing in text. This is slower than setting Text but raises more events.

    :param value: Value to enter in the element
    :param post_wait: Optional wait after operation. True=100ms, float=custom seconds, callable=custom function
    """
    from flaui.core.input import Mouse

    self.raw_element.Enter(value)
    Mouse._apply_post_wait(post_wait)