diff --git a/Authtication.py b/Authtication.py index e07bb18..0de0f9a 100644 --- a/Authtication.py +++ b/Authtication.py @@ -73,7 +73,9 @@ class BUCTAU: try: driver.find_element(By.XPATH, '/html/body/main/section/div[1]/div[2]/input').send_keys(self.USER_USERNAME) driver.find_element(By.XPATH, '//*[@id="password"]').send_keys(self.USER_PASSWORD) - driver.find_element(By.XPATH, '/html/body/main/section/div[1]/div[8]/button[1]').click() + login_button = driver.find_element(By.XPATH, '/html/body/main/section/div[1]/div[8]/button[1]') + driver.execute_script("arguments[0].click();", login_button) + # driver.find_element(By.ID,"login-account").click() return True except selenium.common.exceptions.NoSuchElementException as e: logging.info("NoSuchElementException: ", e) diff --git a/run.py b/run.py index 258aacd..e30990f 100644 --- a/run.py +++ b/run.py @@ -5,7 +5,7 @@ from Authtication import BUCTAU def main(): """Main function to run the script.""" authenticator = BUCTAU() - driver = authenticator.init_driver_chrome() + driver = authenticator.init_driver_edge() past_time = time.time() while True: if time.time() - past_time > 10.0: