Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I created a script in Python, which scraps the Altium's website and gathers information regarding license usage. At this moment, I am using ChromeDriver, but I sometimes get errors due to the network being slow at different times of the day. I used the same script using the MicrosoftWebDriver (Edge) on my Personal Computer and I received no errors. When you launch the MicrosoftWebDriver.exe (downloaded from their website) it should open Edge, but when I use my company's laptop, nothing happens (see attached picture).

Is there any chance I can fix this? Is this happening as a result of the port being blocked?

This is the code I am using for selecting the webdriver:

browser = webdriver.Edge(r'C:ALTIUM_WORKAltium_PythonMicrosoftWebDriver.exe')

And this is the "error" I get:

enter image description here

And nothing happens after this...

The Python's Shell says this:

Traceback (most recent call last):
  File "C:ALTIUM_WORKAltium_PythonAltium_H1.py", line 172, in <module>
    browser = webdriver.Edge(r'C:ALTIUM_WORKAltium_PythonMicrosoftWebDriver.exe')
  File "C:Program Files (x86)Pythonlibsite-packagesseleniumwebdriveredgewebdriver.py", line 66, in __init__
    desired_capabilities=capabilities)
  File "C:Program Files (x86)Pythonlibsite-packagesseleniumwebdriver
emotewebdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:Program Files (x86)Pythonlibsite-packagesseleniumwebdriver
emotewebdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:Program Files (x86)Pythonlibsite-packagesseleniumwebdriver
emotewebdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:Program Files (x86)Pythonlibsite-packagesseleniumwebdriver
emoteerrorhandler.py", line 208, in check_response
    raise exception_class(value)
selenium.common.exceptions.WebDriverException: Message: Unknown error
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
202 views
Welcome To Ask or Share your Answers For Others

1 Answer

You need to pass the argument executable_path as follows:

browser = webdriver.Edge(executable_path=r'C:ALTIUM_WORKAltium_PythonMicrosoftWebDriver.exe')

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...