Unable to find element on closed window on IE 11 with Selenium

后端 未结 6 1711
醉话见心
醉话见心 2020-12-14 10:39

I\'m trying to run tests on Internet Explorer 11 working with Selenium WebDriver. The code is:

System.setProperty(\"webdriver.ie.driver\", \"Path/to//IEDrive         


        
6条回答
  •  清歌不尽
    2020-12-14 11:14

    I faced the same issue after going through every possible solution finally I got the answer.Try this it will definitely solve your problem as well.

    DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
    
    capabilities.setCapability(CapabilityType.BROWSER_NAME, "IE");
    
    capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
    
    capabilities.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION, true);
    
    System.setProperty("webdriver.ie.driver","C://MavenTest//driver//IEDriverServer.exe");
    
    driver = new InternetExplorerDriver();
    

提交回复
热议问题