[Solution found, see below]
I am working with the following Python script (using Python 2.7) to open Microsoft Edge and browse to www.freelancer.in (using Selenium 3.8.1):
import os
from selenium import webdriver
# create new Edge session
dir = os.path.dirname(__file__)
edge_path = dir + "\MicrosoftWebDriver.exe"
driver = webdriver.Edge(edge_path)
driver.implicitly_wait(10)
driver.get("https://www.freelancer.in/")
It works properly on my local machine: Windows Pro Version 1709, OS 16299.125. However, it does not work on my virtual machine... I can't figure out why because I have the exact same Windows 10 Pro installed, I am using the same Microsoft Webdriver.exe (16299.15). The Microsoft WebDriver.exe seems to be working since it says:
[15:32:45.548] - Listening on http://localhost:17556/
But after, I receive the following error:
Traceback (most recent call last):
File "C:\Users\program.py", line 9, in <module>
driver = webdriver.Edge(edge_path)
File "C:\Python27\lib\site-packages\selenium\webdriver\edge\webdriver.py", line 43, in __init__
desired_capabilities=capabilities)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 154, in __init__
self.start_session(desired_capabilities, browser_profile)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 208, in check_response
raise exception_class(value)
WebDriverException: Message: Unknown error
I didn't find any specific config to do in Microsoft Edge. Any ideas of what could be responsible for this error?
=> Solution found there : selenium.common.exceptions.WebDriverException: Message: Unknown error while trying to use Edge and MicrosoftWebDriver.exe through Selenium It was not working on the virtual machine because the User Account Control settings were Turned off... Turned on UAC resolved the issue.
=> Solution found there : selenium.common.exceptions.WebDriverException: Message: Unknown error while trying to use Edge and MicrosoftWebDriver.exe through Selenium It was not working on the virtual machine because the User Account Control settings were Turned off... Turned on UAC resolved the issue.