Micro Focus QTP (UFT) Forums

Full Version: Changing URL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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.
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