How to record Selenium Script for Popups? How to record Selenium Script for Popups? selenium selenium

How to record Selenium Script for Popups?


If its an advertisement then I think it would be a new window, you can use getallwindowtitles, then loop thru the result to get to the adv window, use selectwindow and then close the window using close. Return back using selectwindow(0)


You can download and use Auto it. Following is the sample of the script that waits for a pop up title and then close it when appears.

While 1    $activeWindowTitle = WinGetTitle(WinActive(""));                If ($activeWindowTitle == "popuptitle") Then       WinClose("popuptitle");    EndIf               sleep(500)WEnd