06-06-2012, 10:57 AM
There are many ways to do this, below is one of them which i will recommend & was using.
Step1:Add the list object to OR and then add listitem object under list object. Make sure that you are able to identify the objects when it is displayed. Use innertext/Name property for the list item.
Step2: Now in the script use the settoproperty and set the value which you have to select.
Step3: Now check whether that listitem object exist or not. If the listitem object exist then select the item else write an error message.
please find the attached screenshot for OR related info, below is the code snippet
Step1:Add the list object to OR and then add listitem object under list object. Make sure that you are able to identify the objects when it is displayed. Use innertext/Name property for the list item.
Step2: Now in the script use the settoproperty and set the value which you have to select.
Step3: Now check whether that listitem object exist or not. If the listitem object exist then select the item else write an error message.
please find the attached screenshot for OR related info, below is the code snippet
Code:
Browser("Combo Boxes").Page("Combo Boxes").WebEdit("CmbEditBox").Click
Browser("Combo Boxes").Page("Combo Boxes").WebEdit("CmbEditBox").Set "o"
Wait (5)
Browser("Combo Boxes").Page("Combo Boxes").WebElement("cmbList").WebElement("ListItem").SetTOProperty "innertext","ohio"
msgbox Browser("Combo Boxes").Page("Combo Boxes").WebElement("cmbList").WebElement("ListItem").Exist(0)
Thanks,
SUpputuri
SUpputuri