1

Possible Duplicate:
How to close a ChromeDriver when running on Grid?

I Open Chrome browser using ChromeDriver and use Quit() method to close chrome at that time browser is hang up and give error as attached in this question

import org.openqa.selenium.WebDriver; 
import org.openqa.selenium.chrome.ChromeDriver;

    public class test{

            public static void main(String[] args) throws InterruptedException {


System.setProperty("webdriver.chrome.driver", "C:\\chromedriver.exe");      
WebDriver driver = new ChromeDriver();      
driver.get("http://google.com");
driver.quit();


        }

    }

enter image description here

These Error listed on windows hang up error

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: chromedriver.exe
  Application Version:  0.0.0.0
  Application Timestamp:    4fe36699
  Fault Module Name:    chromedriver.exe
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   4fe36699
  Exception Code:   80000003
  Exception Offset: 000143e0
  OS Version:   6.1.7600.2.0.0.768.2
  Locale ID:    16393
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt
Community
  • 1
  • 1
Jasmine.Olivra
  • 1,751
  • 9
  • 24
  • 37

1 Answers1

-1

Steps followed by you are perfectly fine, but as a good practice please close all the active browser windows associated with the driver and then quit the driver.

It may throw exceptions at times, when you quit the driver before closing browser windows.

In this case...i would write as following

Driver.Close();

Driver.Quit();

please try to do the following,i hope the chrome error should be gone :)

All the best.

Anuragh27crony
  • 2,957
  • 1
  • 19
  • 29