Chromedriver.exe hangs at the end of Intern.js script Chrome 76 /ChromeDriver 76.0.3809.25

120 Views Asked by At

I am facing one issue: after my functional tests finish, the browser closes, but chromedriver.exe stays running, leading to multiple instances of chromedriver.exe .

I have automated project which internally calls Intern, at the end all processes started by intern must be destroyed else result of our test will KO . But since in some cases it hangs chromedriver.exe after functional test finishes we get KO result

I am using intern 3.1.1 (it's our projects requirement), Chrome version 76 and ChromeDriver 76.0.3809.25.

I have tried modifying tunnel.js

    childProcess.kill('SIGINT');
            kill(childProcess.pid);

still same behavior..

tried taskkill 1.2 and 3

also tried

    setTimeout(function() {
       childProcess.kill('SIGINT');
               },
       100);

still same behavior.

what i need to change so that chromedriver closes automatically at the end of script execution

Thank You

1

There are 1 best solutions below

0
jason0x43 On

Intern (really digdug) kills Selenium when a test session finishes, but (particularly on Windows) that doesn't always end up killing any started chromedrivers.

Dig Dug v2 deals with that by explicitly killing the immediate children of the Selenium process as well as the process itself.

You could do something similar in a custom version of digdug, around here.