If I make a simple script like this:
from selenium import webdriver
from selenium.webdriver.ie.service import Service
import os
from pathlib import Path
path = Path().absolute()
path = os.path.join(path, 'IEDriverServer')
driver = webdriver.Ie(executable_path=path)
driver.get('https://www.google.com/')
print("ANYTHINGGG")
Selenium opens the Edge on IE mode (no problem), opens google, but after that it stops... don't print "ANYTHINGGG" and I cannot program anything after driver.get('https://www.google.com/')
.
This problem seems to be in any site.
Anyone has a clue of what can solve that?
(I am using windows 10, python 3.7.9)
Just expect that the code do not stops on driver.get('https://www.google.com/')
CodePudding user response:
If you want to automate Edge IE mode with IEDriver, you need to:
- Define
InternetExplorerOptions
with additional properties that point to the Microsoft Edge browser. - Start an instance of
InternetExplorerDriver
and pass itInternetExplorerOptions
. IEDriver launches Microsoft Edge and then loads your web content in IE mode.
CodePudding user response:
It's working now, after meet the Required Configuration, specifically after creating the registries entries on windows, thank you Yu Zhou