How to open a link in new tab and then coming back to previous tab in webdriver



  • I have a situation in which I have to perform some action on one web page and their changes will reflect in the other web page. And after that I want to check whether changes are reflecting or not by visiting the other web page. So is their any way to achieve this?

    The point is both the web pages are of different application. I was willing to perform task on one web page in one tab and then opening other web page in other tab. If there is any other way to do this. kindly suggest.



  • Use the Actions object to open a new tab. Perform a action who press and hold the ctrl key and after that press the t key. After that release all keys.

    ctrl and t is the shortcut to open a new tab in the most browsers.

    To switch between the tabs you use the following shortcut: ctrl and TAB.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2