Selenium get currently active tab Selenium get currently active tab selenium selenium

Selenium get currently active tab


Just store the originally opened window, then you can have your app switch to it.

var OriginalWHND = Driver.GetWindowHandles()[0];...// when you need to switch back..Driver.SwitchTo().Window(OriginalWHND);