mahler.protocols.window ======================= .. py:module:: mahler.protocols.window Classes ------- .. autoapisummary:: mahler.protocols.window.Window Module Contents --------------- .. py:class:: Window(model: Literal['chrome', 'firefox'], headless: bool = True, enable_javascript: bool = True, fingerprint: mahler.fingerprint.Fingerprint | None = None) Bases: :py:obj:`Protocol` Remote browser interactive API. :param model: Browser type. :type model: Literal["chrome", "firefox"] :param headless: Run in headless mode. Defaults to True. :type headless: bool, optional :param enable_javascript: Enable JavaScript in browser. Defaults to True. :type enable_javascript: bool, optional :param fingerprint: Browser fingerprint to apply, if any. Defaults to None. :type fingerprint: Fingerprint | None, optional .. py:method:: goto(url: str, timeout: float | None = None) -> None Navigate to a URL. :param url: URL to visit. :type url: str :param timeout: Time in seconds to let load. Defaults to None. :type timeout: float | None, optional .. py:method:: query_selector_all(selector: str) -> list[mahler.protocols.element.Element] | None Select all elements on the page 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) -> mahler.protocols.element.Element | None Select the first element on the page 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