简体   繁体   中英

How to get PID of the certain chromedriver in c# - there are multiple instances

Due to an annoying bug that exists in selenium : https://github.com/SeleniumHQ/selenium/issues/4054

I need to kill the chromdriver.exe manually. However, i wonder that are there anyway i can get the PID of the existing chrome driver?

I am using windows 8.1

Other components

  • Selenium.Support 3.4.0
  • Selenium.WebDriver 3.4.0
  • Selenium.WebDriver.ChromeDriver 2.29.0
  • c# .net 4.6.2
  • Microsoft Visual Studio Community 2017 RC

To clarify, there are multiple instances and i want to get only certain instance PID

i think u can use answer from this link Getting a pid of a process created in C#

as it was stated where System.Diagnostics.Process.GetProcessesByName("chromdriver.exe")[0].Id

will return PID number

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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