0
A
答えて
0
String winHandleBefore = driver.getWindowHandle();
// Perform the click operation that opens new window
driver.findElement(By.xpath("yourElement").click());
// Switch to new window opened
for(String winHandle : driver.getWindowHandles()){
driver.switchTo().window(winHandle);
}
// Perform the actions on new window
// Close the new window, if that window no more required
driver.close();
// Switch back to original browser (first window)
driver.switchTo().window(winHandleBefore);
関連する問題
- 1. Webdriver IOのタブを切り替える
- 2. Python Selenium with Chrome。別のタブを切り替える方法
- 3. Selenium 2でPHP-Webdriverでフレームを切り替える
- 4. タブをクリックしないでタブを切り替える方法
- 5. Selenium Webdriverを使用してブラウザウィンドウを切り替える
- 6. タブを切り替える
- 7. オープニング新しいタブでリンクとタブを切り替える(セレンwebdriverを+パイソン)
- 8. SeleniumをPythonでフレーム内のフィールドに切り替える方法
- 9. JavaFXでタブをプログラムで切り替える方法
- 10. タブ間をプログラムで切り替える
- 11. Android:TableLayoutのデータをタブ間で切り替える方法
- 12. PhpStorm:OSXでタブとツールウィンドウを切り替える方法は?
- 13. Selenium WebDriverをポップアップに切り替えることができません
- 14. iframeへの切り替え方法/切り替え方法
- 15. コントローラを破棄してタブを切り替える方法
- 16. セレンのwebdriverで2つのウィンドウをJavaで切り替える
- 17. クリックしてタブを切り替える方法
- 18. セレンの別のタブにフォーカスを切り替える方法は?
- 19. Selenium WebDriverを使用して2つのブラウザウィンドウを切り替える
- 20. 図のf3に切り替える方法(Selenium + Python)
- 21. タブをプログラム的に切り替える
- 22. タブ内のフラグメントを切り替える
- 23. アンドロイドウェブビューのタブを切り替える
- 24. セレンのwebdriverタブが切り替わらない
- 25. 切り替える方法タブprogramtically HTML/JS
- 26. UITabBarController - 特定のタイプのタブに切り替える方法
- 27. 前のiframeがselenium webdriverで閉じられていないときにiframeに切り替える方法
- 28. Selenium WebDriverの子から新しい親ウィンドウに切り替えるJava
- 29. Selenium webdriverを使用してブラウザのポップアップにフォーカスを切り替える方法C#
- 30. タブの切り替えの確認
新しいウィンドウのように機能します。 –