mahler.protocols.element ======================== .. py:module:: mahler.protocols.element Classes ------- .. autoapisummary:: mahler.protocols.element.Element Module Contents --------------- .. py:class:: Element(native_element: Any, parent: Element | None = None) Bases: :py:obj:`Protocol` Remote browser object API. :param native_element: The native element API for the underlying automation suite. :type native_element: Any :param parent: The parent. Defaults to None. :type parent: Element | None, optional .. py:property:: parent :type: Element | None The parent element this was selected from, if any. .. py:method:: query_selector_all(selector: str) -> list[Element] | None Select all child elements of this node that match the given selector. :param selector: A CSS or XPATH selector string. :type selector: str :returns: A list of elements found, if any. Otherwise, None. :rtype: list[Element] | None .. py:method:: query_selector(selector: str) -> Element | None Select the first child element of this node that matches the given selector. :param selector: A CSS or XPATH selector string. :type selector: str :returns: Found element, if any. Otherwise, None. :rtype: list[Element] | None .. py:method:: click() -> None Click on this element. .. py:method:: content() -> str Return the text content of this element. .. py:method:: type_on(text: str, delay: float = 0) -> None Emulate typing on this element. :param text: Text to type. :type text: str :param delay: Time in seconds to wait between keys. Defaults to 0. :type delay: float, optional