0

I am trying to execute the selenium web driver script in IE browser but I got this error? can any one provide the solution.

Code :

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;

public class demo3 {

    public static void main(String[] args) {
        // TODO Auto-generated method stub

        System.setProperty("webdriver.ie.driver", "C:\\work\\MicrosoftWebDriver.exe");
        WebDriver driver= new InternetExplorerDriver();     
        driver.get("http://www.msn.com");
        System.out.println(driver.getTitle());
        System.out.println(driver.getCurrentUrl());




    }

}

Getting Error in console and have also attached the screenshot :

Aug 12, 2018 8:52:17 PM org.openqa.selenium.os.OsProcess checkForError SEVERE: org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "C:\work\MicrosoftWebDriver.exe" (in directory "."): CreateProcess error=193, %1 is not a valid Win32 application) Exception in thread "main" org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start. Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:32:14.902Z' System info: host: 'GITANJALI-PC', ip: '192.168.0.12', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '10.0.2' Driver info: driver.version: InternetExplorerDriver at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:193) at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:179) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:212) at org.openqa.selenium.ie.InternetExplorerDriver.run(InternetExplorerDriver.java:221) at org.openqa.selenium.ie.InternetExplorerDriver.(InternetExplorerDriver.java:213) at org.openqa.selenium.ie.InternetExplorerDriver.(InternetExplorerDriver.java:150) at demo3.main(demo3.java:10) Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:42885/status] to be available after 20007 ms at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:100) at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:188) ... 8 more Caused by: java.util.concurrent.TimeoutException at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:204) at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:156) at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75) ... 9 more

  • can you please edit it a bit so that we can read it? – Yu Zhang Aug 12 '18 at 21:26
  • You probably are trying to run the application compiled for 64-bit Windows under 32-bit Windows. – Alexey R. Aug 13 '18 at 10:00
0

Change the following line as

   System.setProperty("webdriver.ie.driver", "C:\\work\\IEDriverServer.exe");

The file name is IEDriverServer.exe and not MicrosoftWebDriver.exe. Check the path for IE driver.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.