Is there a way to close a tab in WebDriver or Protractor?

后端 未结 8 1279
悲&欢浪女
悲&欢浪女 2020-12-01 06:37

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

8条回答
  •  囚心锁ツ
    2020-12-01 06:53

    You can use driver.close and then switch to active tab driver.SwitchTo().Window(m_driver.WindowHandles.First()); or any another available tab

提交回复
热议问题