Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to switch tabs in selenium

Set<String> handle = driver.getWindowHandles();

		Iterator<String> it = handle.iterator();

		String parentId = (it.next());
		System.out.println("parenWidowId" + parentId);

		String childId = (it.next());
		System.out.println("childWindowId" + childId);

		driver.switchTo().window(childId);
		
 
PREVIOUS NEXT
Tagged: #switch #tabs #selenium
ADD COMMENT
Topic
Name
9+4 =