I wanna use selenium for testing my web app.
It works ... but ...
For the confirm dialog box I've rewrite the method
function confirm(text,cbk) {
$.prompt(text,{
buttons:{Ok:true, Cancel:false},
opacity: 0.3,
overlayspeed: 'fast',
promptspeed: 'slow',
callback: function(v,m){
if(v){
cbk.call();
}
else{
}
}
});
}
I was used jquery and the plugin Impromptu for the graphic of the confirm box.
I record my test with Selenium IDE. After I start my test and the test fail. The test is "click in a link and should be appear the dialog box (impromptu style), and after that I wanna press key 'Ok'"
This is the code of the test
<!-- login page -->
<tr>
<td>open</td>
<td>/demoit/action/Home</td>
<td></td>
</tr>
<!-- inser the username and the password -->
<tr>
<td>type</td>
<td>user_name</td>
<td>tommaso</td>
</tr>
<tr>
<td>type</td>
<td>pass_word</td>
<td>pwdtommaso</td>
</tr>
<!-- click in the login image that call a script for login -->
<tr>
<td>clickAndWait</td>
<td>css=body > div:nth(2) > p > img</td>
<td></td>
</tr>
<tr>
<td>chooseCancelOnNextConfirmation</td>
<td></td>
<td></td>
</tr>
<!-- click on exit link -->
<tr>
<td>click</td>
<td>css=#mycontentheader > table > tbody > tr:nth(1) > td:nth(1) > table.entrata > tbody > tr > td > a > img</td>
<td></td>
</tr>
<tr>
<td>assertConfirmation</td>
<td>Do you want to exit?</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>jqi_state0_buttonOk</td>
<td></td>
</tr>
That was produced by Selenium IDE.
What is the problem?
Please help me,
Regards,
Tommaso