How to use another version of IE (IE6, 7, 8, 9 and 10) in Selenium WebDriver with Java

I downloaded "IEDriverServer_Win32_2.28.0.zip" from the following URL: http://code.google.com/p/selenium/downloads/detail?name=IEDriverServer_Win32_2.28.0.zip&can=2&q=

After extracting the zip file to a folder, I used this path in my Java WebDriver code, as shown below:

File file = new File("E:\\Global Blue\\globalblue-selenium-test\\gb-selenium-test\\lib\\IEDriverServer_Win32_2.28.0\\IEDriverServer.exe"); System.setProperty("webdriver.ie.driver", file.getAbsolutePath()); driver = new InternetExplorerDriver(); 

Tests work well in Internet Explorer. How can I use a different version of IE (IE6, 7, 8, 9, and 10) in my Selenium WebDriver test?

+4
source share
1 answer

The IE driver will use any version of IE installed on the computer. There is no supported way to run multiple versions of IE with the same operating system installation. Although there are solutions that claim that this is so, they still do not have enough. Even when using different document modes, they are not ideal, and in the IE driver there is no way to programmatically set the document mode.

The way to run different versions of IE using the IE driver is to use a different Windows installation for each version of IE that you want to work with. Virtual machines are a great approach to this.

+4
source

All Articles