简体   繁体   English

我如何获取PhantomDriver进程ID

[英]How i can get PhantomDriver process ID

Hello to all 大家好

I use selenium phantomJS webDriver and in some cases the drivers still stay in the system after program ends (i use proper exit driver.Quit() ) 我使用硒phantomJS webDriver,并且在某些情况下,程序结束后驱动程序仍保留在系统中(我使用适当的退出driver.Quit()

i made app for looking at the process's that's still running with all the information (windowHandle, processID and so on..) 我制作了一个应用程序,用于查看仍在运行的所有信息(windowHandle,processID等)。

but

How can i get my phantom driver process id to string? 如何将幻像驱动程序进程ID转换为字符串?

i want to compere after the process and find the program that making the issue. 我想在此过程结束后找到引起问题的程序。

Thank you. 谢谢。

Found it if somebody interested: 如果有人感兴趣的话找到它:

var driverService = PhantomJSDriverService.CreateDefaultService(System.Environment.CurrentDirectory);
driverService.HideCommandPromptWindow = true;
driver = new PhantomJSDriver(driverService);
string phantomProcessId = PJSdriverService.ProcessId.ToString();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM