criteria in QTP for identifying WinObject and WebElement
Hi People,I wanna know what criteria is set in QTP for identifying WinObject and WebElement. I am facing a scenario where at times it is taking the object as a WebElement and at other point as an WinObject. Help Appreciated
NOTE : [I][This question was asked by Nawab Shaikh] [/I]
Re: criteria in QTP for identifying WinObject and WebElement
hi
in QTP every object is recognized by its properties.if the objects are in the windows environment they will be winobject,winedit,etc i.e. the logical name will start with "win" and in web applications it will be "web".
as in the question qtp is identifying the same object at some times as winobject and at some other times as webelement.this may be due to the following reason:
-->if the qtp is opened first and then the (AUT) test application - the qtp recognises or identifies any webelement as webelement if vice-versa has happened then the webelement is identified as winobject.
--> so always we have to open the qtp first then the application.
please correct if i am wrong
Re: criteria in QTP for identifying WinObject and WebElement
[QUOTE=JobHelper;5143]Hi People,I wanna know what criteria is set in QTP for identifying WinObject and WebElement. I am facing a scenario where at times it is taking the object as a WebElement and at other point as an WinObject. Help Appreciated
NOTE : [I][This question was asked by Nawab Shaikh] [/I][/QUOTE]
It's better if you are working on window application, then uncheck the web add-in. I am sure you will not phase this problem again.
Re: criteria in QTP for identifying WinObject and WebElement
Unfortunatly you can't do much when the object is recognized as WinObject. It's something equivalent to not able to recognize the object as one of the standard controls
Re: criteria in QTP for identifying WinObject and WebElement
Hi All,
Object identification properties can be used in the object repository description, in programmatic descriptions, in checkpoint and output value steps, and as argument values for the GetTOProperty and GetROProperty methods. If the object is not found in the object repository, the TestObjName is defined as follows:
Window("IBM").Window("Window"). WinObject ("Edit").SetSelection 0,2
Window("IBM").Window("Window"). WinObject ("Edit").WaitProperty"Focused",True,5000
If Window("IBM ").Window("Window"). WinObject ("Edit").Exist then
Window("IBM ").Window("Window"). WinObject ("Edit").Click"
If the object is found in the application, QuickTest uses the value of the property it normally uses when adding this object to the object repository, surrounded by [ ].
If the object is not found in the application, QuickTest uses the value of the object's Class Name property, surrounded by [ ].
Hope it helps!