SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.63k stars 8.18k forks source link

[🐛 Bug]: 'code': 65, 'message': 'error sending request for url (https://msedgedriver.azureedge.net/LATEST_RELEASE_116_WINDOWS): error trying to connect: tls handshake eof', 'driver_path': 'browser_path':"') Unable to obtain driver for microsoftedge using selenium manager., #12610

Closed gitkdp2844 closed 1 year ago

gitkdp2844 commented 1 year ago

What happened?

Traceback (most recent call last):

File "selenium\webdriver\common\driver_finder.py", line 38, in get_path File "selenium\webdriver\common\selenium_manager.py", line 90, in driver_location

File "selenium\webdriver\common\selenium_manager.py", line 138, in run selenium.common.exceptions.WebDriverException: Message: Unsuccessful command executed: C:\Users\Desktop\main\selenium\webdriver\common\windows\selenium-manager.exe --browser MicrosoftEdge --output json.

'code': 65, 'message': 'error sending request for url (https://msedgedriver.azureedge.net/LATEST_RELEASE_116_WINDOWS): error trying to connect: tls handshake eof', 'driver_path': 'browser_path':"')

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "main.py", line 5, in

File "snow.py", line 68, in open_snow File "selenium\webdriver\edge\webdriver.py", line 45, in _init

File "selenium\webdriver\chromium\webdriver.py", line 51, in _init File "selenium\webdriver\common\driver_finder.py", line 41, in get_path

selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for MicrosoftEdge using Selenium Mana ger.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/er ors/driver_location

7516] Failed to execute script 'main' due to unhandled exception! Press any key to continue. MicrosoftTeams-image (8)

How can we reproduce the issue?

class A:

    # Loading yaml and relative paths in class level
    def __init__(self):         

        self.t=datetime.datetime.today().strftime ('%d-%b-%Y_%H-%M')
        log_format = "%(levelname)s %(asctime)s - %(message)s"
        logging.basicConfig(filename='log/log'+str(self.t)+'.txt', level=logging.INFO, format=log_format, filemode='w')
        self.logger = logging.getLogger()
        self.dir_path = os.getcwd()
        with open(f"{self.dir_path}/configuration.yaml", 'r') as stream:
            self.data_loaded = yl.safe_load(stream)

            # Using selenium loading/ performing Browser operations

    def threaded_function(self,url,driver):
        url=self.data_loaded["url"]
        driver.get(url)
    def threaded_function2(self):
        tm.sleep(15)
        pg.press(['tab','tab','tab'])
        pg.press('enter')

    def B(self):
        """
        SNOW Details fetching method
        """
        if self.data_loaded['url'].lower() == 'chrome':
            driver = webdriver.Chrome(ChromeDriverManager().install())
            if self.data_loaded['ENVIRONMENT'].lower() == 'test' :
                thread2=Thread(target=A().threaded_function2)
                thread2.start()
                thread=Thread(target=tA().threaded_function(self.data_loaded['url'],driver))
                thread.start()
            elif self.data_loaded['ENVIRONMENT'].lower() == 'prod' :
                driver.get(self.data_loaded['url'])
            else :
                driver.get(self.data_loaded['url']) 
        elif self.data_loaded['SNOW_BROWSER'].lower() == 'edge':
            driver = webdriver.Edge(EdgeChromiumDriverManager().install())
            if self.data_loaded['ENVIRONMENT'].lower() == 'test' :
                thread2=Thread(target=A().threaded_function2)
                thread2.start()
                thread=Thread(target=CcesSnow().threaded_function(self.data_loaded['url'],driver))
                thread.start()
            elif self.data_loaded['ENVIRONMENT'].lower() == 'prod' :
                driver.get(self.data_loaded['url'])
            else :
                driver.get(self.data_loaded['url'])
        else:
            driver = webdriver.Edge()
            driver.get(self.data_loaded['url'])
        tm.sleep(7)
        driver.maximize_window()
        wait = WebDriverWait(driver, 20, poll_frequency=5)

Relevant log output

No log has generated.

Operating System

windows 10

Selenium version

Python 3.11 selenium 4.11.2

What are the browser(s) and version(s) where you see this issue?

edge- 116.0.1938.54 chrome- 116.0.5845.111

What are the browser driver(s) and version(s) where you see this issue?

edge- 116.0.1938.54 chrome- 116.0.5845.111

Are you using Selenium Grid?

No

github-actions[bot] commented 1 year ago

@gitkdp2844, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

diemol commented 1 year ago

That means you could not connect to https://msedgedriver.azureedge.net/LATEST_RELEASE_116_WINDOWS.

Are you behind a proxy? Can you reach that URL from your browser and through a curl/wget in your terminal?

diemol commented 1 year ago

I will close this because we did not get more information.

github-actions[bot] commented 11 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.