i am not getting it. i will clearly tell what i needs,
i am having a object in the object repository, object name is "Incident Number" it belongs to WebEdit class. while in the runtime i will get the object name using that i want to get the class name for the particualr object whether it is webedit or weblist. pls help me,
Since the classes for both the objects are different they should be recognised by QTP as independent objects.
Add both the objects in your object repository and do a check like this:
If browser(..).page(..).frame(..).WebEdit(..).Exist(5 ) Then
reporter.reportEvent micDone, "WebEdit Exists",""
ElseIf browser(..).page(..).frame(..).WebList(..).Exist(5 ) Then
reporter.reportEvent micDone, "WebList Exists",""
You can embed other code in the corresponding code blocks.