Run Test on Internet Explorer Browser

Internet Explorer can be communicated with the help of Internet explorer driver. It serves as a link between your tests in Selenium and the Internet Explorer browser. IE driver server is an executable file that should be kept in any of the system path before starting tests.

Let’s start with Testcase by opening IE browser and navigate to close the browser


Step1: Right click on src folder and select New > Class


Step2: Provide Class Name and click on Finish


Step3: Open URL:  in your browser and select any of the latest driver version according to your browser version. Download and unzip file.

Set a system property “” to the path of your IEDriverServer.exe file and instantiate an IEDriver class.

Here below your test script will look like


import org.openqa.selenium.By; 
import org.openqa.selenium.WebDriver;

public class IETest {

public static void main(String[] args) {

// System Property for IEDriver
System.setProperty("", "D:\IE Driver Server\IEDriverServer.exe");

// Instantiate a IEDriver class.
WebDriver driver=new InternetExplorerDriver();

//Maximize the browser

// Launch Website and navigate to URL

//close the browser




Run the code by right click on the Eclipse code and select Run As > Java Application