Showing posts with label How to Open a browser using UFT. Show all posts
Showing posts with label How to Open a browser using UFT. Show all posts

Tuesday, 10 February 2015

UFT - QTP How to open a Browser using UFT and VB Script

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview


'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'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



                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

Wednesday, 30 April 2014

QTP - UFT - How to open a browser with google.com as url using VBSript

This question is some time confusing for on going interview guys.

How to open a browser with google.com as url using VBSript or How to open a browser with google.com using UFT or QTP.

Answer is simple


Syntax
Set o1= Createobject("InternetExplorer.Application")
o1.Visible = true
o1.Navigate "www.google.com"
Set o1 = nothing


Regards,
Sreenu Babu