Is there a way to physically close a tab via Protractor or WebDriver?
I ask because while I know how to switch tabs programmatically, but it does not bring the acti
C# Version of Sakshi's answer:
var tabs = driver.WindowHandles; if (tabs.Count > 1) { driver.SwitchTo().Window(tabs[1]); driver.Close(); driver.SwitchTo().Window(tabs[0]); }