SUBSCRIBE HERE TO GET POST UPDATES VIA EMAIL :

Delivered by FeedBurner

"storeSelectOptions" and "storeValue" commands in selenium IDE

"storeSelectOptions" Command

We can use "storeSelectOptions" command with only list box and drop downs. Function of this command is it will store all option labels names of targeted drop down or targeted list box in to variable. See bellow given example.


New Test
Command Target Value
storeSelectOptions ctrl55_Contentitem_State label
storeValue chk_box_01value

In above example, "storeSelectOptions" command will store all option labels names of targeted list box
(ctrl55_Contentitem_State) in to variable "label". You can use this command when you need all labels names of drop down.


 "storeValue" Command

We can use "storeValue" command with radio button or check box. It will check and store targeted element's value "ON" or "OFF". "ON" means selected and "OFF" means not selected.

In above example, It will check specified target element chk_box_01's value. If its checked then it will store "ON" into variable "value" else it will check "OFF" in variable "value". In this way you can check and store current state of specified targeted radio button or text box.

2 comments:

  1. I did not get to check on the suit. chk_box_01 - this is the ID of our element. Selenium does not give me "ON"/"OFF".


    ReplyDelete