We can handle popup window in selenium using getWindowsHandles() method to get the set of windows and get their handle. Then pass the handle to window() method available in WebDriver instance variable.
We can remove all the handles from before the popup window appears with the command
Set afterPopup=driver.getWindowsHandles();
afterPopup.removeAll(beforePopup).
Using Popup Window
This is the page
Run the test




No hay comentarios:
Publicar un comentario