Micro Focus QTP (UFT) Forums
selecting the checkbox item within in a combox box - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: selecting the checkbox item within in a combox box (/Thread-selecting-the-checkbox-item-within-in-a-combox-box)



selecting the checkbox item within in a combox box - vangala srinivas - 12-06-2010

I have a problem in writing a script for selecting the checkbox item in a combox box. please help me.

my Problem in brief summary:

I have to select a checkbox item with in a combobox (combox box contains many checkbox items).
when I try to use the following code :
Code:
SwfWindow("frmSplash").SwfWindow("Prompts : Answers").SwfComboBox("ModuleComb").Select "xxxx"

QTP is throwing error message:
“Cannot identify the specified item of the ModuleComb object. Confirm that the specified item is included in the object's item collection.”
I am using shared Object repository...

While adding the object of SwfWindow("Prompts : Answers") i have selected all object types in the define object filter of the Object Repostory Manager.only combox object is captured and checkbox item list object not captured.


ii)and also how to select the checkbox items in the combo box?


RE: selecting the checkbox item within in a combox box - nandu - 12-06-2010

Hi..

Use Object Spy to get the Details of Perticular Check box in Combo box..

and Verify that object exist in obj repository or not..?
If it exist in object repository then chek..

Whether Default Properties of that object is enough to identified by QTP or not..
If not.. then u can add some more properties..


RE: selecting the checkbox item within in a combox box - vangala srinivas - 12-06-2010

i have used Object Spy to get the details of checkbox item,but I only got the details of combobox..there is no checkbox object infomation.and also could not able to select the checkbox which is within the combobox using the object spy.only we can select the combobox

This checkbox object is a child object of the combobox.


RE: selecting the checkbox item within in a combox box - bfakruddin - 12-06-2010

get the itemcount for that combobox, then loop for all items and get micclass of the items... and set that as an object and set "ON" at your desired item(Loop)...
if it is not working...
let me know.


RE: selecting the checkbox item within in a combox box - vangala srinivas - 12-06-2010

Hi..
Thanks for the Reply...

when we use the getitemscount the combobox is returing the 0 count...so we can't go further scripting

Actually the Application functionality is like this: if we click the combobox..it will displays the checkbox item list.where we can select the items from this list.

Object repositories :
when we add the objects(shared rep) from ORM(Obj Rep Manager) ..it is captured as swfcombobox(ccb)..and no checkbox or list object within this object
so if write the script as : SwfWindow("frmSplash").SwfWindow("Prompts : Answers").SwfComboBox("ModuleComb").getitemscount..it is displaying count as 0

when we record from QTP(local rep)..it is captured as cclb (swf list)within the swfwindow(ccparent)..
so if write the script as : SwfWindow("frmSplash").SwfWindow("Prompts : Answers").SwfWindow("ccbParent").SwfList("cclb").Select "Nursing Postop"
QTP is throwing the error message:Cannot find the "cclb" object's parent "ccbParent" (class SwfWindow). Verify that parent properties match an object currently displayed in your application.

and we could able to view only the swfcombobox(ccb) in the application from view of the ORM and could not view the objects cclb (swf list)and the swfwindow(ccparent) from the Object Repository Manager(ORM)