Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/
I need to close all open browser processes on the remote machine before running a Selenium test against it.
I used this line of code:
[SetUp] public void SetUp(){ Process [] proc Process.GetProcessesByName("chromedriver.exe"); proc[0].Kill(); } But it works when I am running locally on my computer and not on the remote computer. Could anyone explain how I could get it to work on a remote machine?
Killing a remote browser is something beyond the scope of selenium.
I have currently setup scheduled batch file which will run every 15 minutes and close any browser open.
My batchfile content to kill Firefox browser.
taskkill /im program.exe
Also, if you are using linux, you can access remote computer via SSH and close any open browser.
Hope that helps!
This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!
1.4k questions
1.6k answers
866 comments
1.9k users