INNER CODE UNIT · Python
GPTWebElement
handrew/browserpilot · browserpilot/agents/gpt_selenium_agent.py:32
class GPTWebElement(webdriver.remote.webelement.WebElement):
"""Wrapper over Selenium's WebElement with an additional iframe ivar for
recordkeeping."""
def __init__(self, web_ele, iframe=None):
# Initialize this object using web_ele.
super().__init__(web_ele._parent, web_ele._id)
self.__dict__.update(web_ele.__dict__)
self.iframe = iframe
class GPTSeleniumAgent:
def __init__(
self,
instructions="",
chromedriver_path=None,
chrome_options={},
user_data_dir="user_data",