Re: HP QTP - checking object's availability (347 Views)
Reply
Advisor
RicoLee
Posts: 35
Registered: ‎05-09-2013
Message 1 of 5 (400 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-.
Regular Advisor
Umang_Agrawal
Posts: 83
Registered: ‎04-30-2008
Message 2 of 5 (372 Views)

Re: HP QTP - checking object's availability

Get Flash Addin installed.

Umang Agrawal
Advisor
RicoLee
Posts: 35
Registered: ‎05-09-2013
Message 3 of 5 (354 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-.
Regular Advisor
Umang_Agrawal
Posts: 83
Registered: ‎04-30-2008
Message 4 of 5 (349 Views)

Re: HP QTP - checking object's availability

What is the problem now?

Umang Agrawal
Advisor
RicoLee
Posts: 35
Registered: ‎05-09-2013
Message 5 of 5 (347 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-.
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.