From cb26c8b1bc22adfa3140d0cea8cc483c678e93dc Mon Sep 17 00:00:00 2001 From: Crizomb <62544756+Crizomb@users.noreply.github.com> Date: Sat, 8 Apr 2023 12:47:42 +0200 Subject: [PATCH] Deleted useless code --- chatgpt_code_interface/driver.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/chatgpt_code_interface/driver.py b/chatgpt_code_interface/driver.py index a355598..0c9afae 100644 --- a/chatgpt_code_interface/driver.py +++ b/chatgpt_code_interface/driver.py @@ -108,28 +108,6 @@ class GPTDriver: }); """) - def add_send_result_button(self): - #html of a big red button with border-radius of 10%, green background and white text pady by 10px up and padx by 10px left - button_html = '' - xpath = """//*[@id="__next"]/div[2]/div[2]/main/div[2]/div/span""" - - # Find the element using the given XPath - element = None - while not element: - try: - element = self.driver.find_element(By.XPATH, xpath) - except: - time.sleep(0.1) - - # Inject the button after the element found using the XPath - self.driver.execute_script(f"arguments[0].insertAdjacentHTML('afterend', '{button_html}');", element) - - # Add the click event listener for the button - self.driver.execute_script(""" - document.getElementById('sendResultButton').addEventListener('click', function() { - window.loopControl2 = 'send_result'; - }); - """) def close(self): self.driver.close()