1

I am using Selenium InternetExplorerDriver to perform some basic actions. In this case, all I am trying to do is bring up IE and navigate to a webpage. So far, I am able to bring up IE, but all I see is: "This is the initial start page for the WebDriver server."

I've spent a lot of time trying to research this problem and have tried a few things, none of which worked. Two of the many things I've tried are:

  1. Setting Protected mode on for all
  2. Ignoring security settings completely

At this point, I am stuck and have no idea how to proceed with IE.

My code:

    public void setUp() throws IOException {

    InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);
    prop.load(inputStream);

    /** Set path for Log4j */
    String pathtolog4j = prop.getProperty("PathToLog4j");
    PropertyConfigurator.configure(pathtolog4j);

    /** Bring up IEDriver & load application */
    String pathtoIEdriver = prop.getProperty("PathToIEDriver");
    File file = new File(pathtoIEdriver);
    System.setProperty("webdriver.ie.driver", file.getAbsolutePath());
    driver = new InternetExplorerDriver();

    logger.info("Get URL");
    String url = prop.getProperty("appURL");
    driver.navigate().to(url);
}

Stacktrace:

Started InternetExplorerDriver server (64-bit) 2.35.3.0 
Listening on port 4297
org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. Could not get document from window handle (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.80 seconds
Build info: version: '2.33.0', revision: '4ecaf82108b2a6cc6f006aae81961236eba93358', time: '2013-05-22 12:00:17'
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_43'

Driver info: org.openqa.selenium.ie.InternetExplorerDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:191)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:151)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:201)
at org.openqa.selenium.ie.InternetExplorerDriver.run(InternetExplorerDriver.java:184)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:174)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:147)
at TestScripts.Drivers.InternetExplorer.IEDriverSetup.setUp(IEDriverSetup.java:64)
4

0 回答 0