Micro Focus QTP (UFT) Forums
QTP basics- invoke browseer and navigate the website address - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: QTP basics- invoke browseer and navigate the website address (/Thread-QTP-basics-invoke-browseer-and-navigate-the-website-address)



QTP basics- invoke browseer and navigate the website address - vaigundamoorthy - 12-13-2008

Hi

I am new for QTP.Could you tell me how to invoke the browser and naviagate the particular site.

How to write the script for invoke the browser and navigate the particualr website?


RE: QTP basics- invoke browseer and navigate the website address - surya_7mar - 12-14-2008

SysUtil.Run sURL

will navigate you to the URL directly


RE: QTP basics- invoke browseer and navigate the website address - surya_7mar - 12-14-2008

SystemUtil.Run sURL


RE: QTP basics- invoke browseer and navigate the website address - sreekanth chilam - 12-14-2008

Hi Moorthy ,

Method 1 :
Code:
Systemutil.Run "www.google.com"

Method 2 :
Code:
Dim br
Set br=CreateObject("InternerExplorer.Application")
br.Navigate "www.google.com"
Set br=Nothing



RE: QTP basics- invoke browseer and navigate the website address - vaigundamoorthy - 12-15-2008

[quote=sreekanth chilam]
Hi srikanth,
when i was trying to method 1 it isworking fine.
Method 1 :
Systemutil.Run "www.google.com"
but when i tried to method 2 system throw error.
Method 2 :
Dim br
Set br=CreateObject("InternerExplorer.Application")
br.Navigate "www.google.com"
Set br=Nothing
I have attached the screenshot.
It would be great if you resolve that one


RE: QTP basics- invoke browseer and navigate the website address - MVChowdary - 12-15-2008

vaigundamoorthy Wrote:[quote=sreekanth chilam]
Hi srikanth,
when i was trying to method 1 it isworking fine.
Method 1 :
Systemutil.Run "www.google.com"
but when i tried to method 2 system throw error.
Method 2 :
Dim br
Set br=CreateObject("InternerExplorer.Application")
br.Navigate "www.google.com"
Set br=Nothing
I have attached the screenshot.
It would be great if you resolve that one

===========================================
Moorthy,
Use this function and it can work.

Code:
Public Sub gen_Open_Browser(sURL)
  Set IE = CreateObject("InternetExplorer.Application")
  IE.Visible = True
  IE.Navigate sURL
  IE.TheaterMode = True
End Sub



RE: QTP basics- invoke browseer and navigate the website address - sreekanth chilam - 12-15-2008

Hi Moorthy,

Just try with the below code , it works fine.

Code:
Dim br
Set br=CreateObject("InternetExplorer.Application")
br.visible=true
br.Navigate "www.google.com"
Set br=Nothing