Pergunta de entrevista da empresa Oracle

Can Selenium handle windows based pop up?

Respostas da entrevista

Sigiloso

29 de mar. de 2018

Selenium is an automation testing tool which supports only web application testing. Therefore, windows pop up cannot be handled using Selenium.

2

Sigiloso

6 de mai. de 2020

Yes Selenium do handle window popups .There is a method available in selenium driver.getWindowHandle() which returns GUID of the current opened browser as String , and driver.getWindowHandles() which returns the GUID's of all the opened windows as Set of Strings.In order to swich in between the windows driver.switchTo.window(Id);//pass the String Id of the window you want to switch to as parameter