Answers for "How do we switch to another window using its handle?"

0

How do we switch to another window using its handle?

driver.switchTo().window(handleOfTabWeWantToSwitch);
We need to create a loop to switch to windows that is opening later on. 
To switch back to the main window (default window):
 driver.switchTo().window(mainHandle);
Posted by: Guest on June-15-2021

Code answers related to "How do we switch to another window using its handle?"

Browse Popular Code Answers by Language