Question

I'm using QTP 11 and I could use a handy reference for all of the possible values for "Class Name". I'm not trying to manipulate this information. I just need a reference. For example I know that I can access any input element using "WebEdit()" but what do I use for, say, a table cell.

I want a list I can refer to, not steps for finding the type of an object.

Was it helpful?

Solution

Three options come to mind immediately:

Option A. The handiest way to find the names probably is to look into the dialog Tools/Object Identification.

There, in the "Test Object classes" listview, you see all test object class names for the environment selected under "Environment" that QTP knows of.

Option B. If in the dialog from A. you push the "Generate script" button, creating a script. Use a grep facility (or TextPad, for that matter) to extract all lines containing the text "Object identification configuration for" from that script. This results in a text which after some cleanup is these lists:

User-defined (?):

"abtobjectgraphicswidget"
"cwarrowbutton"
"cwcheckbutton"
"cwlabel"
"cwpushbutton"
"cwradiobutton"
"cwtext"
"cwtext_multi"
"ewflowediconlist"
"ewiconarea"
"ewiconlist"
"ewicontree"
"ewpmnotebook"
"ewspinbutton"
"ewtablelist"
"ewtabletree"
"ewwinnotebook"
"gxcombobox"
"gxedit"
"gxlistbox"
"listview20wndclass"
"listviewwndclass"
"msvb_lib_toolbar"
"richedit"
"seccustomtoolbar"
"secmenubar"
"sectabctrl"
"sectabwnd"
"sectreectrl"
"sectreeview"
"stgrid"
"sysdatetimepick32"
"sysmonthcal32"
"textedit"
"treeview20wndclass"
"treeviewwndclass"

Standard (?):

"activex"
"acxbutton"
"acxcalendar"
"acxcheckbox"
"acxcombobox"
"acxedit"
"acxradiobutton"
"acxtable"
"javaapplet"
"javabutton"
"javacalendar"
"javacheckbox"
"javadialog"
"javaedit"
"javaexpandbar"
"javainternalframe"
"javalink"
"javalist"
"javamenu"
"javaobject"
"javaradiobutton"
"javaslider"
"javaspin"
"javastatictext"
"javatab"
"javatable"
"javatoolbar"
"javatree"
"javawindow"
"dialog"
"static"
"winbutton"
"wincalendar"
"wincheckbox"
"wincombobox"
"window"
"winedit"
"wineditor"
"winlist"
"winlistview"
"winmenu"
"winobject"
"winradiobutton"
"winradiogroup"
"winscrollbar"
"winspin"
"winstatusbar"
"wintab"
"wintable"
"wintoolbar"
"wintreeview"
"browser"
"frame"
"image"
"link"
"page"
"viewlink"
"webarea"
"webbutton"
"webcheckbox"
"webedit"
"webelement"
"webfile"
"weblist"
"webradiogroup"
"webtable"

Note 1: the user-defined objects are probably add-on specific, or otherwise registered in a special way in QTP. Note 2: this is just a sample of what you might get on your machine. For example, I don´t have the Delphi add-on active, so all the Delphi control´s test object class names are missing. If you want me to activate all add-ons, and re-create this list, I´ll give you my bank account first ;)

Option C. In the online help, from the contents, try navigating to the "HP QuickTest Professional Object Model Reference". It contains chapters per environment, and most of them consist of "X Object" chapters, i.e. there is a "WebButton Object" chapter under "Web".

Option D. See Rich's answer :-O

OTHER TIPS

Since micclass is the same thing as the Class Name property (other than programming placement), the class names of the objects that you are trying to apply to micclass can be utilized. To find the class names of all objects used in the QTP environment, you can use the Mercury.ObjectRepositoryUtil to iterate through the objects and collect what's necessary for the micclass.

More details on that -> Here and Here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top