"verifyEval" Command in selenium IDE plug in
"verifyEval" Command is very useful when you want to compare two values or string especially when you want to compare result of script with stored values in variable.
In bellow given example, I have compared value(5) stored in variable "VarA" with result of javascript{2+3}" script. It will becomes true because 5 = javascript{2+3}. You can verify reverse result by editing these
values.New Test | ||
Command | Target | Value |
open | https://www.google.co.in/ | |
type | id=gbqfq | 5 |
storeValue | id=gbqfq | VarA |
verifyEval | javascript{2+3} | ${VarA} |
type | id=gbqfq | abcd |
storeValue | id=gbqfq | VarB |
assertEval | 'abc' | ${VarB} |
"assertEval" Command in selenium IDE plug in
"assertEval" Command is working same as "verifyEval" Command but will stop execution if fail. In above example, i have given example of "assertEval" Command for string so that you can understand it better. In above example, "assertEval" will fail because string "abcd" will not match with string "abc".
No comments:
Post a Comment