Python Selenium stuck at webdriver.Ie()



  • Hi I am running Selenium in python with internet explorer using IEDriverServer_Win32_3.150.2 from selenium.dev site with the following code:

    from selenium import webdriver
    from selenium.webdriver.common.keys import Keys
    
    #Setting up the driver
    caps = webdriver.DesiredCapabilities.INTERNETEXPLORER
    caps['ignoreProtectedModeSettings'] = True
    caps['nativeEvents'] = True
    caps['ignoreZoomSetting'] = True
    caps['InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS'] = True
    caps['requireWindowsFocus'] = True
    
    driver = webdriver.Ie(executable_path="C:\\IEDriverServer.exe", capabilities=caps)
    

    The driver successfully open IE 11 with no warning and with the welcoming page "This is the initial start page for the WebDriver server." however Python seems to stuck at executing drive = webdriver.Ie() and I have no way to call driver.get()

    I have followed the instruction by making sure all protected mode turns on.



  • I used VirtualBox to install Window 7 and without updates solved the problem. Thanks all

    One thing I notice why IE11 not working in the host computer is under "About Internet Explorer" it doesn't shows the IE version but instead the Window 10 version.

    enter image description here

    In the working VM, the IE displays the actual version of IE:

    enter image description here

    I believe this is why it is stuck in the webdriver, something to do with the IE itself.


Log in to reply
 

Suggested Topics