I want to be able to programmatically launch the default web browser on a given web page from a WinForms notification area application. I'm currently doing this with Process.Start(url)
. The downside of this is that if a user action triggers the launch again, they'll have two browsers open to the same page, something I'd like to avoid. I've tried tracking the Process
and bringing it to the forefront, but there's no guarantee the user hasn't navigated away or closed the relevant tab. I know I can use a WebBrowser
control, but would rather use the actual browser if possible. I also need the solution to work with any of the major browsers.
Now I might be barking up the wrong tree, but I stumbled across Selenium WebDrivers, which are new to me. I know it's primarily for automated testing of web applications, but have also seen a couple of articles indicating that it can be used more generally. Is it possible to use Selenium to launch a browser window and track whether it's still on the relevant web page in a production environment?