ipankaj ipankaj - 1 year ago 118
Java Question

Why multiple chromedriver instance keeps on running after completion of a test suite

I am using chrome driver 2.1 and Google chrome 28.
Selenium standalone server 2.31. I run a set of 350 test and at the end 25 chrome-driver instances are running.

Answer Source

It's not just in case of chrome driver. It is the same with firefox driver.

If you forgot to use server.stop() or your program interrupted in between, you can use this port to start your server from next time

    import org.browsermob.proxy.ProxyServer;

Import the above.

    String sePortNumber = System.getProperty("WEBDRIVER_SERVER_PORT_NUMBER");
    if (sePortNumber == null) {
    ProxyServer server = new ProxyServer(Integer.parseInt(sePortNumber));

You will get a random unused port every time.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download