How to Use Internet Explorer Driver with Selenium

Mozilla Firefox, Google Chrome, and Internet Explorer are the three leading browsers that any QA engineer would choose for Web automation testing. For today’s Selenium tutorial, we are going to use internet explorer driver for website test automation. We’ll also create a simple Selenium regression testing suite and run a small test case for the demo.

If you’ve read our previous post on using Chrome for website test automation, then it’ll be easy for you to run through this post. Next, for your note, IE is already in the Selenium browser support list. And it provides an InternetExploreDriver module which is an executable server. It is the implementation of Webdriver interface which enables the execution of Selenium regression testing suite.

Same like the Chrome driver, InternetExplorerDriver module talks to the Webdriver client using the WIRE protocol. But you need to add activation instructions to get it working. So first of all, let’s see how to download the IntrenetExplorerDriver. We’ve given two green links below so that you can easily download it. It comes in two flavors: a 32-bit version and a 64-bit version. So download the version depending on the type of system you are using.

1. 32-bit IE Driver.
2. 64-bit IE Driver.

Use Internet Explorer Driver with Selenium

As we’ve specified above, you need to call a few activation steps to use internet explorer driver. So here are the two cents that you’ll spend to run your test code.

System.setProperty("", driverPath+"IEDriverServer.exe");
driver = new InternetExplorerDriver();

Since we’d already covered the creation of Selenium testing projects in many of our previous posts, so you can refer one of the links given below. In this ongoing Selenium tutorial, we’ll keep our focus only to create a simple Selenium regression testing suite.

Also, before we move on, probably it’s a good idea to outline the use case we’ll cover in the code snippet.

  • Activate Internet Explorer driver module.
  • Create an IE Webdriver instance.
  • Launch Internet Explorer browser.
  • Navigate to Google homepage.
  • Validates the title text of the page.

Now, let’s check out the sample source code.

Code Snippet:

package com.selenium.regression;

import org.openqa.selenium.WebDriver;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

public class IEBrowserTest {
	static String driverPath = "path of IEDriverServer on local system";
	public WebDriver driver;
	public void setUp() {
		System.out.println("launching IE browser");
		System.setProperty("", driverPath+"IEDriverServer.exe");
		driver = new InternetExplorerDriver();

	public void testGooglePageTitleInIEBrowser() {
		String strPageTitle = driver.getTitle();
		System.out.println("Page title: - "+strPageTitle);
		Assert.assertTrue(strPageTitle.equalsIgnoreCase("Google"), "Page title doesn't match");

	public void tearDown() {
		if(driver!=null) {
			System.out.println("Closing IE browser");

Quick Wrap-up

Hopefully, the blog post was able to help. If you fall into any runtime issues, then do write to us for a solution.

If you want more of such posts like this “How to use Internet Explorer Driver with Selenium“, then please visit here more often.

All the Best,