-1

Selenium Code:

System.setProperty("webdriver.ie.driver","D:\\Automation\\Drivers\\IEDriverServer.exe");
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability("ignoreZoomSetting", true);
WebDriver driver = new InternetExplorerDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
Thread.sleep(3000);
driver.get("http://google.co.in");

Error :

Started InternetExplorerDriver server (64-bit)
3.8.0.0
Listening on port 25160
Only local connections are allowed
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" org.openqa.selenium.remote.SessionNotFoundException: session null does not exist (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2 milliseconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'TS-39', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_91'
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Sagar
  • 31
  • 1
  • 1
  • 7
  • Any time the browser launches but the URL is not entered, the first thing you should do is make sure you that your Selenium driver and browser is up-to-date (or at least matching versions if you've intentionally downgraded). – JeffC Jan 09 '18 at 15:45

1 Answers1

1

The error says it all :

org.openqa.selenium.remote.SessionNotFoundException: session null does not exist

Reason

The main reason you are seeing SessionNotFoundException is because of the following reasons :

  • You are using the InternetExplorerDriver of version 3.8.0.0 which is apparent from the logs below and is properly initiated.

    Started InternetExplorerDriver server (64-bit)
    3.8.0.0
    Listening on port 25160
    Only local connections are allowed
    
  • But your Selenium version is 2.53.1 which is apparent from the logs below :

    Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
    
  • Moreover your JDK version is much older of version 1.8.0_91 which is apparent from the logs below :

    System info: host: 'TS-39', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_91'
    

Solution

The simple solution would be :

  • Update your JDK version to current levels JDK (Java SE 9.0.1).
  • Update your Selenium-Java Client version to current levels v3.8.1.
  • Update your InternetExplorerDriver version to current levels v3.8.0.0.
  • Execute your Test.
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352