Most of all software spider web applications contains listing box or drib downs on spider web page in addition to "assertSelectedId" in addition to "assertSelectedIds" commands are rattling useful to verify in addition to assert the ids of selected label/s from listing box. Both these are rattling proficient alternatives of "assertSelectedIndex", "assertSelectedIndexes",
"MANY MORE.
"MANY MORE.
"assertSelectedId" Command
"assertSelectedId" ascendency banking concern check in addition to assert if selected label's id is same equally expected id or not. If both are same hence this ascendency volition decease else it volition furnish fault similar '[error] Actual value 'country3' did non tally 'country4'' inwards execution log in addition to selenium IDE volition halt execution.
"assertSelectedIds" Command
"assertSelectedIds" ascendency plant same equally "assertSelectedId" ascendency but for multiple selected labels. Run bellow given representative inwards your selenium IDE window in addition to verify result.
New Test | ||
Command | Target | Value |
open | ||
addSelection | //select[@name='FromLB'] | label=Japan |
assertSelectedId | FromLB | country3 |
addSelection | //select[@name='FromLB'] | label=Germany |
assertSelectedIds | FromLB | country3,country6 |
assertSelectedIds | //select[@name='FromLB'] | country3,country7 |
First "assertSelectedId" ascendency volition decease because on this stage, selected label's actual in addition to expected id are same. Frist "assertSelectedIds" command volition decease too. Second "assertSelectedIds" ascendency volition neglect in addition to selenium IDE volition halt its execution.