This happens with me also. I did find the solution though.
There are four methods of the effective Web-based pop-up handling:
- string getText() method returns the text displayed on the alert box
- void accept() method clicks on the “Ok” button as soon as the pop-up window appears
- void dismiss() method clicks on the “Cancel” button as soon as the pop-up window appears
- void sendKeys(String stringToSend) method enters the specified string pattern into the alert box
Hope it helps.