Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (19.7k points)

I have a button that displays Javascript confirmation popup. This is a part of my test case:

<tr>

    <td>clickAndWait</td>

    <td>buttonId</td>

    <td></td>

</tr>

<tr>

    <td>verifyTextPresent</td>

    <td>Object has been deleted</td>

    <td></td>

</tr>

It works as expected: OK is clicked automatically on a popup and verifyTextPresent return true. Still, I get [error] There was an unexpected Confirmation! in the log and test case fails.

Any suggestions?

1 Answer

0 votes
by (62.9k points)

I encountered the same problem, and I solved it like this:

 

chooseOkOnNextConfirmation click buttonId assertConfirmation

 

This makes my test run green in my Selenium IDE.

 

The code to do this is:

 

<tr>

    <td>chooseOkOnNextConfirmation</td>

    <td></td>

    <td></td>

</tr>

<tr>

    <td>click</td>

    <td>ctl00_CPHMain_ucFormDMS_grdDocumentList_ctl00_ctl04_btnDelete</td>

    <td></td>

</tr>

<tr>

    <td>assertConfirmation</td>

    <td>Areyousureyouwanttodeletethisdocument?</td>

    <td></td>

</tr>

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.7k users

Browse Categories

...