How to run Selenium webdriver on IE
2014-01-22 15:46
316 查看
I tried to change selenium webdriver - driver server from Firefox to IE ,and encountered several problem. after googling on internet and doing some search,finally resolved it. To keep improving myself, I write down some of the problems I met. It's better
to set the IE as below to aviod issues.
(the envrioment is IE 9.0 , IEDriverServer_x64_2.39.0,selenium-java-2.38.0.zip,selenium-server-standalone-2.38.0)
1. IE driver server address needed to specified by command below, otherwise ,the webdrive cannot find the IE driver server
System.setProperty("webdriver.ie.driver", "the path of the IEserve)
2. IE zoom should be set to 100%
ieCapabilities.setCapability("ignoreZoomSetting", true);
3. The security level for each website should be equal, (after I resolvedthe "cannot find element” issue, I find this setting has nothing to dowith the problem)
DesiredCapabilities ieCapabilities =DesiredCapabilities.internetExplorer();
ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
WebDriver wd = new InternetExplorerDriver(ieCapabilities);
4.Maxmize the window opene,otherwise the element is hard to find even it's working fine on FF.
js code
to set the IE as below to aviod issues.
(the envrioment is IE 9.0 , IEDriverServer_x64_2.39.0,selenium-java-2.38.0.zip,selenium-server-standalone-2.38.0)
1. IE driver server address needed to specified by command below, otherwise ,the webdrive cannot find the IE driver server
System.setProperty("webdriver.ie.driver", "the path of the IEserve)
2. IE zoom should be set to 100%
ieCapabilities.setCapability("ignoreZoomSetting", true);
3. The security level for each website should be equal, (after I resolvedthe "cannot find element” issue, I find this setting has nothing to dowith the problem)
DesiredCapabilities ieCapabilities =DesiredCapabilities.internetExplorer();
ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
WebDriver wd = new InternetExplorerDriver(ieCapabilities);
4.Maxmize the window opene,otherwise the element is hard to find even it's working fine on FF.
js code
相关文章推荐
- How to run 32 bit .NET Windows apps on 64 bit Windows (including with IEExec)
- How to Configure Selenium Webdriver in Eclipse and execute some simple test script.
- selenium.common.exceptions.WebDriverException: Message: 'IEDriverServer.exe' executable needs to be
- Selenium2学习-038-firefox、webdriver版本不对称问题解决:org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055
- HOW TO RUN YOUR WEB SERVER AND MQTT WEBSOCKETS BROKER ON THE SAME PORT
- HOW TO RUN YOUR WEB SERVER AND MQTT WEBSOCKETS BROKER ON THE SAME PORT
- How to Handle Javascript Alert, Prompt, Confirmation dialog using selenium webdriver?
- How to get browser name, version and operating system detail in selenium 2(Web driver)
- selenium问题:webdriver Unable to connect to host 127.0.0.1 on port 7055
- 解决org.openqa.selenium.WebDriverException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms org.springframework.beans.BeanInstantiation
- How to set Selenium Python WebDriver default timeout?
- How to take partial screenshot with Selenium WebDriver in python
- Using Selenium 2 ( WebDriver ) to run qUnit test page
- How can selenium web driver get to know when the new window has opened and then resume its execution
- How to Locate Web Elements with Selenium WebDriver?
- How to enable an ASP.Net application to run on a SharePoint virtual server
- How to get the control inside the ControlTemplate/DataTemplate on run time.
- Selenium的WebDriver打开IE失败的解决办法
- Tomcat - 在Mac的安装和运行(How to Install and Run Tomcat on Mac)
- How to run cpp-tests on iOS