SergeyPirogov / webdriver_manager

Apache License 2.0
2.07k stars 461 forks source link

Stacktrace issue on AWS after updating the webdriver-manager to 4.0.2 #679

Open tejasPandirkar93 opened 3 months ago

tejasPandirkar93 commented 3 months ago

Can someone explain what exactly the below issue is and help me: The attached screenshot is of the logs from AWS. image

The next attached screenshot is when the code is ran locally on Windows. image

We are fetching data from Amazon Vendor Central and below is the code snippet. Earlier the code was working fine. The attached screenshot is of the logs from AWS. I have updated the libraries: webdriver-manager==4.0.2 selenium==4.23.1 selenium-wire==5.1.0

` def setup_driver(self): print("setup_driver()") chrome_options = Options() chrome_options.add_argument("--headless") chrome_options.add_argument("--no-sandbox") chrome_options.add_argument("--disable-dev-shm-usage")

    # Create a Service object using ChromeDriverManager
    service = ChromeService(ChromeDriverManager().install())

    # Initialize the WebDriver with the Service object and Chrome options
    driver = webdriver.Chrome(service=service, options=chrome_options)
    driver.implicitly_wait(30)
    driver.set_window_size(1792, 1095)

    return driver

def login(self): print("login()") WebDriverWait(self.driver, 10).until(EC.element_to_be_clickable((By.ID, "ap_email"))).send_keys(self.user_name) WebDriverWait(self.driver, 10).until(EC.element_to_be_clickable((By.ID, "ap_password"))).send_keys(self.password + Keys.ENTER) time.sleep(15) # Wait for potential redirects or additional processing

    self.handle_captcha()
    self.resolve_otp()`