First of all delight hold off at THIS POST where I accept described divergence betwixt label too value inwards driblet downward or listing box. Don't larn confused from these 2 words. Selenium IDE has many assertion commands too all of them are designed for unlike purpose. Here i am going to depict you "assertSelectedLabels"
and "assertSelectedValues" commands but you lot tin hold off at examples of related commands similar "assertSelectedIds", "verifySelectedValues" etc.
"assertSelectedLabels" Command
"assertSelectedLabels" ascendence is useful to assert multiple selected options using its label. You tin besides assert unmarried selected label from listing box using this command.
"assertSelectedValues" Command
"assertSelectedValues" ascendence is designed to assert multiple selected options using its option's value.
Selenium IDE volition halt execution if whatever assert ascendence volition fail.
Bellow given instance volition present you lot clear divergence betwixt "assertSelectedValues" too "assertSelectedLabels" commands. Execute it inwards selenium IDE too give away result.
New Test | ||
Command | Target | Value |
setSpeed | 2000 | |
open | ||
addSelection | name=FromLB | label=Mexico |
addSelection | name=FromLB | label=India |
addSelection | name=FromLB | label=Italy |
assertSelectedLabels | name=FromLB | Mexico,India,Italy |
assertSelectedValues | name=FromLB | MEX,IND,ITA |