How to bring running chrome instance in foreground/ontop when test is run through fitnesse wiki

790 Views Asked by At

I have different selenium tests created on my fitnesse wiki. Fitnesse wiki is opened in a chrome browser. Now, When I hit on Test to run a particular test on fitnesse wiki, it opens a new chrome instance and runs tests there. The problem is that the new chrome instance opens in background and I can not see the execution unless I manually click the running chrome instance to bring it to foreground. My requirement is that whenever a new instance opened, it should get opened in foreground/OnTop without any manual intervention. How can I achieve this using selenium C#. Any help will be very much appreciated.

1

There are 1 best solutions below

5
On

Since Chrome was opened by Selenium, you should have access to that window.

Try to maximize the window:

driver.Manage().Window.Maximize();