HP QTP - checking object's availability (310 Views)
Reply
Advisor
RicoLee
Posts: 35
Registered: ‎05-09-2013
Message 1 of 5 (310 Views)

HP QTP - checking object's availability

[ Edited ]

Hi, I would like to know if there is a way for QTP to verify if an flash ojbect / java object is available and displaying properly in browser during testing. 

.-asd-.
Please use plain text.
Regular Advisor
Umang_Agrawal
Posts: 83
Registered: ‎04-30-2008
Message 2 of 5 (282 Views)

Re: HP QTP - checking object's availability

Get Flash Addin installed.

Umang Agrawal
Please use plain text.
Advisor
RicoLee
Posts: 35
Registered: ‎05-09-2013
Message 3 of 5 (264 Views)

Re: HP QTP - checking object's availability

[ Edited ]

Installed Flex add-in and used a simple code in 'expert view' to check for object availability:

Set objShell = CreateObject("Wscript.Shell")
If (Browser("SchoolDude - Toolbox Login").Page("DDF Model - 3 Columns").Frame("Frame").WebElement("FusionCharts").Exist) #the element can be identified using ObjectSpy in QTP. 
Then objShell.Popup "Available", 3, "Fusion Chart"  #this will create a dialogue box for 3 seconds. 
else Reporter.ReportEvent micWarning, "Fusion Chart", "Chart Failed" #this will make the result report a warning if the object does not appears.  
End If 
set objShell = Nothing

 

.-asd-.
Please use plain text.
Regular Advisor
Umang_Agrawal
Posts: 83
Registered: ‎04-30-2008
Message 4 of 5 (259 Views)

Re: HP QTP - checking object's availability

What is the problem now?

Umang Agrawal
Please use plain text.
Advisor
RicoLee
Posts: 35
Registered: ‎05-09-2013
Message 5 of 5 (257 Views)

Re: HP QTP - checking object's availability

It is solved for now. I'll make use of the simple solution and work around it.

.-asd-.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation