I'm trying to run a simple headless web-browser;
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Ie("headless_ie_selenium.exe")
driver.get("www.google.com")
print(driver.title)
And I'm getting:
selenium.common.exceptions.SessionNotCreatedException: Message: Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070012 ('There are no more files.') for URL 'http://localhost:65393/'
What I've tried but didn't work:
1:
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
caps = DesiredCapabilities.INTERNETEXPLORER.copy()
caps['ie.ensureCleanSession']= True
driver = webdriver.Ie("headless_ie_selenium.exe",capabilities=caps)
2: All Internet Options Security settings are at the same level and all have checked Enabled Protected Mode;
3: Searched for a C:\Program folder to delete, but there was nothing.
Notes: The same code works fine with the normal webdriver (IEDriverServer.exe), and when I open the headless_ie_selenium.exe manually it starts:
Selenium driver found at: path..\IEDriverServer.exe
Started InternetExplorerDriver server (32-bit)
3.8.0.0