Reputation: 61
I'm running my DalekJS tests (0.0.8) successfully in PhantomJS and also in Chromium on a Linux system.
But i have a small problem with Chromium.
After running the tests the dalek process will not quit. I can only end it with Ctrl+C or by Closing Chrome manually.
I would like to implement an automatic testing system. Therefore it would be nice if the test process would quit like with phantom or with the saucelabs driver.
Is there something i can do about that?
Edit: From the verbose log i see that "dalek-browser-chrome: Shutting down ChromeDriver" is emitted. So the kill code somehow does not work on my Debian 7.
Thanks!
Upvotes: 1
Views: 322
Reputation: 61
I helped myself with a quick and dirty fix.
It looks like the code does not recognize all chrome processes to kill. Many of the pids and processIDs that are checked are 'undefined'. Maybe it has to do with the fact that i use Chromium on my Debian 7.4 x86 system.
The dirty fix is to add the following code into the index.js of the dalek-browser-chrome module at line 599 in the function _checkProcesses() just under the comment "//kill leftover chrome browser processes":
if (process.platform != 'win32'){
cp.exec('pkill -f /usr/lib/chrom');
}
Of course this will kill all Chromium instances. Not only the ones spawned by DalekJS. But for my usecase this is sufficient for now.
Upvotes: 2