SHARE
TWEET

Untitled

a guest Apr 26th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static void switchToWindow(String targetTitle){
  2.         String origin = driver.getWindowHandle();
  3.         for (String handle : driver.getWindowHandles()){
  4.             driver.switchTo().window(handle);
  5.             if(driver.getTitle().equals(targetTitle))
  6.                break;
  7.         }
  8.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top