Micro Focus QTP (UFT) Forums
Changing URL - 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: Changing URL (/Thread-Changing-URL)



Changing URL - capf - 09-13-2010

Hi,

I'm trying to change the URL after I made QTP log in to an application:

'Start Browser
Call funcOpenBrowser ("iexplore.exe", "http://xxx.xxx.com/MyApp")

'login
Call funcLoginform ("me","changeme")


At this point I wan to change the URL to:

http://www.cnn.com

Thanks


RE: Changing URL - jsknight1969 - 09-13-2010

Should be as simple as...

Code:
'The following example uses the Navigate method to navigate to the
'Mercury Interactive Web site.

Browser("Mercury Tours").Navigate ("www.merc-int.com")

That is from the QTP help documentation.


RE: Changing URL - bfakruddin - 09-14-2010

Once you invoke browser with URL.

with Systemutil.Run "iexplore", "www.google.com"

it invoke the internet explorer with "www.google.com" url,

invokeapplication "path of the internet explorer/other browser"
Browser("CreationTime:=0").Navigate2 "www.google.com"

even this invokes the browser and navigate to "www.google.com"

Here, we can change url on same browser by using Navigate or Navigate2 methods... to navigate other url's

Here, you can use descriptive way or directly use the saved browser in OR.

Browser("Google").Navigate2 "www.yahoo.com" ' It navigates from google page to Yahoo page