'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'Comments
'Author : Sreenu Babu
'Date :-
'Purpose :- To Open a Browser using UFT and VB Script
'Usage :- Call OpenApplication( www.google.com, google)
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Function OpenApplication( byval WebURL, byval BrowserTitleName)
BrowserTitleName = TitleName
ApplicationName = WebURL
Set objIe = createobject("internetexplorer.application")
objIe.visible = true
objIe.navigate cstr(ApplicationName)
wait 3
If browser("name:=.*"& TitleName &".*").exist(5) Then
Reporter.ReportEvent 4,"OpenApplication", "Navigagtion to page " & ApplicationName
Reporter.ReportEvent micPass,"OpenApplication" , "Opened Applcaiton "&TitleName
OpenApplication =0
else
Reporter.ReportEvent 4,"OpenApplication", "Navigagtion to page " & ApplicationName
Reporter.ReportEvent micFail,"OpenApplication","Unable to open page "&TitleName
OpenApplication =1
End If
End Function
Regards,
Sreenu Babu
Post that you may be interested in
How to maximize Browser using QTP/UFT
No comments:
Post a Comment