webdriver.ie.driver System Property setting driver executable

0 votes

I am using Selenium for automating the tests. My application exclusively uses IE, it will not work on other Browsers.

Below is the code:

import org.openqa.selenium.ie.InternetExplorerDriver;

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;


public class Test {

    public static void main(String[] args) {

        final String sUrl = "http://www.google.co.in/";                             

        System.setProperty("webdriver.chrome.driver","C:\\Users\\vthaduri\\workspace\\LDCSuite\\IEDriverServer.exe");

        WebDriver oWebDriver = new InternetExplorerDriver();

        oWebDriver.get(sUrl);

        WebElement oSearchInputElem = oWebDriver.findElement(By.name("q")); // Use name locator to identify the search input field.

        oSearchInputElem.sendKeys("Selenium 2");

        WebElement oGoogleSearchBtn = oWebDriver.findElement(By.xpath("//input[@name='btnG']"));  

        oGoogleSearchBtn.click();


        try {

            Thread.sleep(5000);

        } catch(InterruptedException ex) {

            System.out.println(ex.getMessage());

        }

        oWebDriver.close();

    }    
}

Below is the error:

The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded from http://www.seleniumhq.org/download/ Jun 12, 2012 4:18:42 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute INFO: I/O exception (java.net.SocketException) caught when processing request: Software caused connection abort: recv failed Jun 12, 2012 4:18:42 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute

Can someone help me on this?

Apr 19, 2018 in Selenium by Martin
• 4,330 points
5,084 views

2 answers to this question.

0 votes

First, you will need InternetExplorer driver executable on your system. You can download it from http://www.seleniumhq.org/download/.Extract it on your System. My location is  C:\Selenium\iexploredriver.exe

Here is the Java code pasted from my Selenium project:

       File file = new File("C:/Selenium/iexploredriver.exe");

       System.setProperty("webdriver.ie.driver", file.getAbsolutePath());

WebDriver driver = new InternetExplorerDriver();

You must set this property before you initialize driver
answered Apr 19, 2018 by Sau
0 votes
System.setProperty("webdriver.chrome.driver","C:\\Users\\vthaduri\\workspace\\LDCSuite\\IEDriverServer.exe");

your miss take is webdriver.chrome.driver

but, we have give to webdriver.ie.driver

 

answered Apr 24, 2019 by anonymous
From where can I download InternetExplorer driver?

Related Questions In Selenium

0 votes
1 answer

Setting the webdriver.chrome.driver system property

When u use Selenium 3.x you should ...READ MORE

answered Jun 26, 2018 in Selenium by Samarpit
• 5,890 points
10,484 views
0 votes
1 answer

getting java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property

Hi Sivaranjani, to resolve your issue, Driver path ...READ MORE

answered Sep 3, 2019 in Selenium by Abha
• 27,930 points
2,156 views
0 votes
1 answer

System.setProperty("webdriver.chrome.driver","") meaning?

The meaning of the statement are almost ...READ MORE

answered Jan 8, 2019 in Selenium by Nabarupa
18,220 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,510 points
3,096 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
2,346 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,890 points
2,493 views
0 votes
3 answers

java.lang.IllegalStateException Error after adding set property webdriver

/* System.setProperty("WebDriver.gecko.driver", "C:\\Users\\DELL\\Desktop\\GeckoDriver1\\geckodriver.exe"); WebDriver driver = new FirefoxDriver(); */ ...READ MORE

answered May 1, 2019 in Selenium by anonymous
8,426 views
0 votes
1 answer