Posts

Showing posts with the label window handles in selenium

Moving between Windows in selenium

Upon clicking let us assume that a new window page is displayed public void stringhandles(){ Set<String>handles = driver.getWindowHandles(); System.out.println("popopopo"+handles.size()); System.out.println("popopopo"+handles); for(String handle:handles){ for(i=0;i<handles.size();i++){ System.out.println( i); if(i==0){ continue; } } driver.switchTo().window(handle); } }