INNER CODE UNIT · Python

wrapper

handrew/browserpilot · browserpilot/agents/gpt_selenium_agent.py:381

        def wrapper(*args, **kwargs):
            self = args[0]
            element = args[1]
            if isinstance(element, GPTWebElement) and (element is not None):
                iframe = element.iframe
                if iframe is not None:
                    self.driver.switch_to.frame(iframe)
                result = func(*args)
                self.driver.switch_to.default_content()
            else:
                result = func(*args)

            return result

        return wrapper

    """Functions meant for the client to call."""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…