syntax for switching windows in selenium
To handle separate tabs/windows we have to switch to that tab
• Web driver handles one page/html document at a time.
• To control another tab, we always need to switch
• To be able switch we need to get the window handle first using
getWindowHandles() method driver.switchTo.window(String) // à window handle
//for each loop : driverGetWIndowHandles:
Driver.switchTo.window(“handle”)
Ifdriver.getTitle==expectedtitle;
Break;