diff --git a/chromegpt/tools/selenium.py b/chromegpt/tools/selenium.py index 7062110..6b39d53 100644 --- a/chromegpt/tools/selenium.py +++ b/chromegpt/tools/selenium.py @@ -1,13 +1,4 @@ """Tool that calls Selenium.""" -from selenium.webdriver.support.ui import WebDriverWait -from selenium.webdriver.support import expected_conditions as EC -from selenium.common.exceptions import StaleElementReferenceException - -from selenium.webdriver.chrome.options import Options -from selenium.webdriver.common.by import By -from selenium.webdriver.common.keys import Keys -from selenium.webdriver.common.action_chains import ActionChains - import json import re import time @@ -19,14 +10,20 @@ from pydantic import BaseModel, Field from selenium import webdriver from selenium.common.exceptions import ( + StaleElementReferenceException, WebDriverException, ) +from selenium.webdriver.chrome.options import Options +from selenium.webdriver.common.action_chains import ActionChains +from selenium.webdriver.common.by import By +from selenium.webdriver.common.keys import Keys +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.support.ui import WebDriverWait from chromegpt.tools.utils import ( find_parent_element_text, get_all_text_elements, prettify_text, - truncate_string_from_last_occurrence, ) diff --git a/chromegpt/tools/utils.py b/chromegpt/tools/utils.py index de84024..3285058 100644 --- a/chromegpt/tools/utils.py +++ b/chromegpt/tools/utils.py @@ -7,8 +7,6 @@ from selenium.webdriver.common.by import By from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver from selenium.webdriver.remote.webelement import WebElement -from selenium import webdriver - from unidecode import unidecode