in

Python – Selenium webdriver raises "n" in exception while obtaining webdriver instance


I recently encountered this issue while using Selenium webdriver.

When I try to obtain an Edge webdriver instance, it raises an exception, but the exception message only includes “n”, which gives me no clue on what actually happened. I’ve tried to Google this exception and gone through the possible list of exceptions of Selenium but got no luck.

Versions of my Edge and Edge driver are the same:

$ /Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge --version
Microsoft Edge 97.0.1072.55
$ /Users/zhongdongy/Libs/msedgedriver --version
MSEdgeDriver 97.0.1072.55 (ce3bf3364880558d4945082f4ac36e01fe36716e)

Selenium version: 4.1.0

Operating system info (macOS Big Sur 11.6 Apple Silicon):

$ uname -a
Darwin 192.168.0.104 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:20 PDT 2021; root:xnu-7195.141.6~3/RELEASE_ARM64_T8101 arm64
$ python3 --version                                                         
Python 3.10.0

Here is the code example:

from selenium.webdriver import Edge

try:
    exec_path = "/Users/zhongdongy/Libs/msedgedriver"
    driver = Edge(exec_path)
    print(driver)
    driver.get('https://bing.com')
except Exception as e:
    print(e)
    exit(1)

And a screenshot of the exception using PyCharm debugger:

[PyCharm debugger screenshot][1]

Thanks in advance!

[1] https://i.stack.imgur.com/NeWIM.png



Source: https://stackoverflow.com/questions/70630138/python-selenium-webdriver-raises-n-in-exception-while-obtaining-webdriver-i

There was an error while implementing the membership email authentication. Please help me

A flutter wallet app for shacoin