why selenium.isConfirmationPresent() returns true after using chooseCancelOnNextConfirmation

Posted by padmakumar on Stack Overflow See other posts from Stack Overflow or by padmakumar
Published on 2011-01-17T13:45:37Z Indexed on 2011/01/17 13:53 UTC
Read the original article Hit count: 153

Filed under:
|

I am having a code like the following

selenium.chooseCancelOnNextConfirmation();

selenium.click("deleteRequest");// confirm dialog will be displayed on clicking the button

System.out.println("is confirmation present "+selenium.isConfirmationPresent());

Eventhough i am using selenium.chooseCancelOnNextConfirmation(), please let me know why selenium.isConfirmationPresent() returns true.

But selenium.isConfirmationPresent() returns false after

selenium.getConfirmation();

Is it mandatory to use selenium.getConfirmation(), as i am not able to do further processing. It says

com.thoughtworks.selenium.SeleniumException: ERROR: There was an unexpected Confirmation! [Are you sure to delete selected request(s)?] com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97) at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:9

© Stack Overflow or respective owner

Related posts about java

Related posts about selenium