Selenium IDE assertSelectedId as well as assertSelectedIds Commands With Example

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.

"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
CommandTargetValue
open
addSelection//select[@name='FromLB']label=Japan
assertSelectedIdFromLBcountry3
addSelection//select[@name='FromLB']label=Germany
assertSelectedIdsFromLBcountry3,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.
More interesting articles here :Generation Enggelmundus Internet Marketing Tool here :Zeageat IM http://www.software-testing-tutorials-automation.com/
Post a Comment (0)
Previous Post Next Post