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
I am using the command below to close the current tab after opening the link in new tab
Instance.Driver2.SwitchTo().Window(Instance.Driver2.WindowHandles[1]).Close();
Then, you can switch to the last tab by issue the command:
Instance.Driver2.SwitchTo().Window(Instance.Driver2.WindowHandles[0]);