Unable to launch IE6

114 views
Skip to first unread message

ARK Satyanarayana Raju

unread,
May 23, 2013, 8:59:06 AM5/23/13
to seleniu...@googlegroups.com
Hi,

My code is unable to open IE.
Any one help me?
 

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

public class OpenIE {
    public static void main(String[] args) {
        System.setProperty("webdriver.ie.driver", "C:\\Documents and Settings\\ssatyanarayana\\My Documents\\Downloads\\IEDriverServer.exe");
        WebDriver wd=new InternetExplorerDriver();
        wd.navigate().to("http://www.google.com/");
        int height = wd.findElement(By.xpath(".//*[@id='hplogo']")).getSize().getHeight();
        System.out.println("Image height is :"+height);
        wd.close();
    }
}

Console:
Started InternetExplorerDriver server (32-bit)
2.33.0.0
Listening on port 32232
Exception in thread "main" org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. IELaunchURL() returned 80070490 for URL 'http://localhost:32232/' (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 13.20 seconds
Build info: version: '2.32.0', revision: '6c40c18', time: '2013-04-09 17:23:22'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.7.0_02'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
    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.setup(InternetExplorerDriver.java:105)
    at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:51)
    at Ex_Pack_1.OpenIE.main(OpenIE.java:10)


Jim Evans

unread,
May 23, 2013, 12:40:48 PM5/23/13
to seleniu...@googlegroups.com
Try running this code and posting the resulting iedriver.log file found in C:\iedriver.log.


import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.ie.InternetExplorerDriverService;
import org.openqa.selenium.ie.InternetExplorerDriverLogLevel.TRACE;
import java.io.File;


public class OpenIE {
    public static void main(String[] args) {
        System.setProperty("webdriver.ie.driver", "C:\\Documents and Settings\\ssatyanarayana\\My Documents\\Downloads\\IEDriverServer.exe");
        InternetExplorerDriverService service = InternetExplorerDriverService.Builder
                                                                             .withLogLevel(InternetExplorerDriverLogLevel.TRACE)
                                                                             .withLogFile(new File("C:\\iedriver.log")).build();
        WebDriver wd=new InternetExplorerDriver(service);
        wd.quit();

ARK Satyanarayana Raju

unread,
May 24, 2013, 8:19:39 AM5/24/13
to seleniu...@googlegroups.com
Hi Jim


I tried u r code but it shows error.
Error at:
InternetExplorerDriverService.Builder.withLogLevel(InternetExplorerDriverLogLevel.TRACE)
Here it shows error line.

Error is: Cannot make a static reference to the non-static method withLogLevel(InternetExplorerDriverLogLevel) from the type InternetExplorerDriverService.Builder

Thanks,
Raju

Alexandr Savchuk

unread,
Jun 3, 2013, 4:47:45 AM6/3/13
to seleniu...@googlegroups.com
try to use:

new  InternetExplorerDriverService.Builder()

instead of:

 InternetExplorerDriverService.Builder

пятница, 24 мая 2013 г., 16:19:39 UTC+4 пользователь ARK Satyanarayana Raju написал:
Reply all
Reply to author
Forward
0 new messages