Before reading this post about "verifyConfirmation" and "assertConfirmation" Command example, you must have to look at other verification Command and Assertion Command examples. "verifyConfirmation" and "assertConfirmation" both are working with confirmation message generated during previous action by selenium IDE. Click here to read - difference between "assert" and "verify" in selenium with examples. Let me describe "verifyConfirmation" and "assertConfirmation" commands with examples.
"verifyConfirmation" Command
"verifyConfirmation" command will retrive the confirmation message text and compare it with targeted text. Return error message like '[error] Actual value 'Press 'OK' or 'Cancel' button!' did not match 'Press 'Cancel' button!'' of both text not match. Else it will be pass.
"assertConfirmation" Commands
"assertConfirmation" command's function is same as "verifyConfirmation" command. Only difference is it will stop execution on failure of "assertConfirmation" command.
Here is one simple example on both the commands. Run it in selenium IDE and try to implement it in your software application regression test case.
New Test | ||
Command | Target | Value |
open | http://only-testing-blog.blogspot.com/2013/10/table.html | |
click | css=button | |
verifyConfirmation | Press 'OK' or 'Cancel' button! | |
click | css=button | |
verifyConfirmation | Press 'Cancel' button! | |
click | css=button | |
assertConfirmation | Press 'OK' or 'Cancel' button! |
mnhjmnmn
ReplyDelete