Monday, June 15, 2015

WebDriver - Close a Browser Tab

WebDriver - Close a Browser Tab

From the first link below it is clear that at the moment, the Selenium WebDriver API doesn't have any way of handling tabs, but still you can have a look at the below links to explore more on closing a tab using WebDriver.

1. Selenium 2: Open link in new tab and close tabs. [Link]
2. Closing all opened tabs except the first tab/main tab using WebDriver. [Link]
3. Sending keys (Ctrl+W) to Firefox to close tabs. [Link]
4. Multitab issue - WebDriver with Python - Solution provided (in solution this post shows how to close a tab). [Link]
5. Selenium: How to close another tab (popup). [Link]
6. How do I close the browser window at the end of a Selenium test? [Link]