Micro Focus QTP (UFT) Forums

Full Version: ActiveX objects
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Smile Greetings of the Day to one and all!!!

I am writing scripts for ActiveX("DataCombo") [Class: ActiveX NameBig GrinataCombo, PrgID: MSDataListLib.DataCombo.1, NativeClass: DataComboWndClass] object to get its item count or present items in it. Its combo box kind of object and getting identified properly in QTP.
But in this object, i am not getting methods like GetItem, GetItemCount, GetContent as we get in VB Combo Box.
Can i include these methods in dataCombo?.

Whenever i try to change its identification in Tools-> Object Identification-> User Defined and Pointing to that object, its giving :
"This is a standard class object and therefore cannot be mapped."
message.

Or at least by using existing methods can I get item(s) present in it?.
Existing Methods are, CaptureBitmap, CheckProperty, ChildProperty, ChildObjects,Click, DblClick, Drag, Drop,Exist, FireEvent, GetROProperty, GetTextLocation, GetTOProperties, GetTOProperty, GetVisibleText,MakeVisible,MouseMove,Object,SetTOProperty,ToString,Type and WaitProperty.

How it can be solved?Please guide.

Thanks and regards.

Girish Pai
Hi Girish ,

Try with the below
Ex:
Code:
ActiveX("DataCombo").GetROProperty("MaxDropDownlistItems")
Hi Sreekanth,

Thank you very much for your prompt replySmile. I will check this and let you know...

Thanks again...
Hi Sreekanth...

"MaxDropDownlistItmes" i have checked like below.
Code:
combo_items=vbwindow("frmMain").VbWindow("frmEmployee").ActiveX("DataCombo").GetROProperty("DropDownlistItems")
msgbox combo_items

Code is executing fine. But its generating message box without any value(Check attached jpg file.)

Can u let me know where I can get methods, which you told?... like u told ("DropDownlistItems").I tried with help file and google search for similar methods. Still no result.

Thanks and Regards.

Girish