Showing posts with label storeSelectedIndex Command. Show all posts
Showing posts with label storeSelectedIndex Command. Show all posts

"storeSelectedIndex" Command

storeSelectedIndex works with only select or multi-select target element like drop down and list box. Using this command, you can get option index of selected option.


New Test
CommandTargetValue
storeSelectedIndexctrl5_Main_ddlStateindexno
echo${indexno}
storeSelectedIndexesctrl5_Main_ddlStateindexnos
echo${indexnos}

(Note : Click here to view examples of other store commands.)

In above example, ctrl5_Main_ddlState target element is list box.Here command "storeSelectedIndex" will store index value of current selected option of target element ctrl5_Main_ddlState list box into variable "indexno". We can also use this command with any drop down. We can use "storeSelectedIndex " if there is