Micro Focus QTP (UFT) Forums
How to set the selectedindex property of the Radcombox >>see description - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to set the selectedindex property of the Radcombox >>see description (/Thread-How-to-set-the-selectedindex-property-of-the-Radcombox-see-description)



How to set the selectedindex property of the Radcombox >>see description - Imtiaz-QA - 08-06-2010

In my application i have 5 or 6 radcombobox on a page.i have create the description for the radcombobox like that
Code:
set statusdesc=Description.Create
statusdesc("micclass").value ="RadComboBox"
statusdesc("class").value="RadComboBox RadComboBox_WebBlue "
set statobj=Browser("test").Page("test").WebTable("testing ").ChildObjects(statusdesc)

then in a loop i want to set the index 2 for all the return objects
Code:
For j=0 to statobj.count-1
statobj(j).Highlight
statobj(j).selectedindex=2
Next
an error like function or property is not supported by the object comes when selectedindex statement executed.


RE: How to set the selectedindex property of the Radcombox >>see description - sreekanth chilam - 08-06-2010

Hi,

Try as given below.
Code:
statobj(j).Select 2



RE: How to set the selectedindex property of the Radcombox >>see description - Imtiaz-QA - 08-09-2010

sreekanth Thanks for reply but it doesnt work for me.

I have try this but it is not working. I am not sure but above code is working with Calendar control on same child objects but when it comes on Rad-Combobox it gives error "Object does not support this method"


RE: How to set the selectedindex property of the Radcombox >>see description - venkatbatchu - 08-09-2010

Hi Imtiaz,

In one of my projects i have faced same kind of issue, for that i also tried many ways but finally which i concluded is it was not related to java add-ins calendar is added as a flavor from different technologies so by that time i tried with all possible ways finally i did with "Send Keys". It works as expected with "Send Keys".So i suggest you to please try with this if you dont have any ways

Note: I have passed send keys as per the Navigation designed to select my particular requirement.

So i suggest you to please pass the send keys as per the navigation designed by developer.

Please let me know for further clarification.


Venkat.Batchu


RE: How to set the selectedindex property of the Radcombox >>see description - Imtiaz-QA - 08-09-2010

Can u plz tell me that how can i fit this function in my code i have try this to select the index 2 of the radcombox but still i throws me the same error.