currentWindow = WebUI.getWindowIndex() WebUI.executeJavaScript('window.open();', [])//打开新tab WebUI.switchToWindowIndex(currentWindow + 1) //切换到新tab WebUI.navigateToUrl('http://www.***.com') WebUI.switchToWindowIndex(currentWindow) //切换回旧tab WebUI.refresh() //刷新 |
|