Check existing browser is opened, Not opened by web driver | Selenium Forum
M
Posted on 09/02/2016
In interview, i faced one question and not able to find the answer. can you please help me with code on below question.

Question:- Suppose we have intentionally opened a browser (by Manually). Now write a code to "first check if browser is already opened or not? if yes, Close the existing browser first and then create a new instance of Browser ?

M
Replied on 09/02/2016

selenium doesn't have any command for that but you can use java and go to system processes to find out if the browser is running or not.