Switch tabs using Selenium WebDriver with Java

前端 未结 21 1458
野性不改
野性不改 2020-11-22 12:09

Using Selenium WebDriver with JAVA. I am trying to automate a functionality where I have to open a new tab do some operations there and come back to previous tab (Parent). I

21条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-22 12:41

    It is A very simple process: assume you have two tabs so you need to first close the current tab by using client.window(callback) because the switch command "switches to the first available one". Then you can easily switch tab using client.switchTab.

提交回复
热议问题