I tried using the code, but the executable-path argument in webdriver.Chrome within the setup_webdriver function is throwing an error. The following works:
def setup_webdriver(self, port):
""" Initializes a Selenium WebDriver instance, connected to an existing Chrome browser
with remote debugging enabled on the specified port"""
chrome_options = webdriver.ChromeOptions()
chrome_options.binary_location = self.chrome_driver_path
chrome_options.add_experimental_option("debuggerAddress", f"127.0.0.1:{port}")
driver = webdriver.Chrome(options=chrome_options)
return driver
Similarly, in the function send_prompt_to_chatgpt, the input box could not be found via XPath using the current expression. The expression //textarea[contains(@id, "prompt-textarea")] fixes the problem.
I will send a pull request with the changes soon, have a good day :)
Hi, and thank you for your work!
I tried using the code, but the executable-path argument in
webdriver.Chrome
within thesetup_webdriver
function is throwing an error. The following works:Similarly, in the function
send_prompt_to_chatgpt
, the input box could not be found via XPath using the current expression. The expression//textarea[contains(@id, "prompt-textarea")]
fixes the problem.I will send a pull request with the changes soon, have a good day :)