Connectionabortederror: [Winerror 10053] an Established Connection Was Aborted by the Software in Your Host Machine With Geckodriver and Firefox

ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine with GeckoDriver and Firefox

Your code block was near perfect. I took your own code and made couple of tweaks which includes inducing WebDriverWait before invoking send_keys() on the USER ID field as follows:

  • Code Block:

    from selenium import webdriver
    from selenium.webdriver.common.by import By
    from selenium.webdriver.support.ui import WebDriverWait
    from selenium.webdriver.support import expected_conditions as EC

    driver = webdriver.Firefox(executable_path=r'C:\Utility\BrowserDrivers\geckodriver.exe')
    driver.get("https://www.fedex.com/apps/fedextracking/?cntry_code=us&locale=us_en#")
    WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//input[@class='fxg-field__input-text' and @name='USER']"))).send_keys('test')
    driver.find_element_by_xpath("//input[@class='fxg-field__input-text' and @name='PASSWORD']").send_keys('test')
    driver.find_element_by_xpath("//button[@class='fxg-button fxg-button--orange' and @name='login']/span").click()
  • Browser Snapshots:

    • USER ID and PASSWORD fields being filled up:

fedex_1

  • Error due to wrong credentials:

fedex_2

Python selenium: WinError 10053 - host is shutting connection down

I got the same problem, my config is:
Firefox 60.0.2 (64 bits)
; geckodriver 0.21.0 ( 64 bits)
; selenium 3.12.0

I resolved this problem by downgrade geckodriver to 0.20.1 ( 64 bits)

java.io.IOException: Connection was aborted by the software in your host machine with Sendkey() in selenium java

This error message...

java.io.IOException: java.util.concurrent.ExecutionException: 
java.io.IOException: Connection was aborted by the software in your host machine

...implies that the exception was raised due to concurrent execution.

As per the discussion ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine with GeckoDriver and Firefox this issue is observed when you attempt to invoke sendKeys() when a JavaScript / jQuery was still active.

Solution

The solution will be to induce WebDriverWait for the JavaScript / jQuery to complete using either of the ExpectedConditions:

  • elementToBeClickable(By locator): An expectation for checking an element is visible and enabled such that you can click it.
  • elementToBeClickable(WebElement element): An expectation for checking an element is visible and enabled such that you can click it.

What has to be done to delay the execution of next line in firefox browser while running robot scripts?

Can you share your environment details - namely the version of the selenium library, Firefox and geckodriver.

There are reports this issue appears with selenium 3.12.0 and geckodriver 0.21.0, and is fixed with downgrade to geckodriver 0.20.1.

And it's fixed/not present with selenium 3.14.0 and geckodriver 0.21.0.

I'd suggest you get your environment in one of the two version sets, if it's not already there, preferably the later.



Related Topics



Leave a reply



Submit