I'm trying to test some things with PhantomJS
(v 2.0) in C#
and is not closing it properly, which causing that my machine uses the 100% of the CPU.
All the program is working fine, except the part to close it.
i tried with
driver.Dispose();
driver.Quit();
driver.Close();
and (all of them)
Enviroment.Exit(-1);
Enviroment.Exit(0);
Enviroment.Exit(1);
return;
but the process still in the task manager
i tried to close the console brutally
Process.GetCurrentProcess().Kill();
but still not working.
there is the message that phantom shows to me in the console
[INFO - 2015-10-19T09:43:58.542Z] GhostDriver - Main - running on port 62810
[INFO - 2015-10-19T09:44:17.480Z] Session [f7138220-7645-11e5-b667-c72dd4c4644c
] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true
,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"loc
alToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Windows NT 6.1; WOW6
4) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.0.0 Safari/538.1","webSecur
ityEnabled":true}
[INFO - 2015-10-19T09:44:17.499Z] Session [f7138220-7645-11e5-b667-c72dd4c4644c
] - page.customHeaders: - {}
[INFO - 2015-10-19T09:44:17.507Z] Session [f7138220-7645-11e5-b667-c72dd4c4644c
] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"2.0.0
","driverName":"ghostdriver","driverVersion":"1.2.0","platform":"windows-7-32bit
","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databas
eEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"
browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":f
alse,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"prox
yType":"direct"}}
[INFO - 2015-10-19T09:44:17.530Z] SessionManagerReqHand - _postNewSessionComman
d - New Session Created: f7138220-7645-11e5-b667-c72dd4c4644c
[INFO - 2015-10-19T09:45:27.620Z] ShutdownReqHand - _handle - About to shutdown
in addition, i'm using selenium, but i don't think that there is an important information.
Any idea?
Thanks.