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,320 points
8,691 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,910 points
17,672 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
• 28,140 points
15,747 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
59,056 views
0 votes
2 answers

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,500 points
13,468 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,022 views
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,910 points
7,136 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,812 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
19,894 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP