Unified Functional Testing Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

HP QTP - checking object's availability

RicoLee
Super Collector

HP QTP - checking object's availability

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-.
4 REPLIES
Umang_Agrawal
Collector

Re: HP QTP - checking object's availability

Get Flash Addin installed.

Umang Agrawal
RicoLee
Super Collector

Re: HP QTP - checking object's availability

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-.
Umang_Agrawal
Collector

Re: HP QTP - checking object's availability

What is the problem now?

Umang Agrawal
Highlighted
RicoLee
Super Collector

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-.
//Add this to "OnDomLoad" event