We get weekly builds where the URL of the Web application changes.Is there any way where we can set the URL of the Application to be run for all the test scripts.Each time the URL changes, i need to change the url of the browser in the Record and Run settings for all the test scripts.

Showing Answers 1 - 4 of 4 Answers

Hi You can write a common function where u can ask the user to enter the url path befor u run the script.Once the user enters the url path then u can call the other function to continue to execute your script.Hope this will help you.Thanks and regardsBindu Dey.

  Was this answer useful?  Yes

msusmitha

  • Feb 6th, 2007
 

hithis is susmitha wherever u have the url in your script.just u call one function which had tht url.whenever the build releses just u change the url path in your predefined function.it is very usefulmadhav_sus@yahoo.co.in

  Was this answer useful?  Yes

Bhamini

  • Feb 10th, 2007
 

Hi,
you can set a user-defined environment variable.
all the variables can be stored in form of an xml file and they are very easy to manage.
create an env variable and store it in an xml file and you can load this external env file at runtime.
its very convenient.another alternative is to use dictionary object. but this is very complex.
another alternative is to use InputBox method as the first line in your script.
this will prompt you to enter any input. you can type the url and store it in a variable.
such as strlink = InputBox ("Enter the weblink")and launch this link.
hope this helps

  Was this answer useful?  Yes

Why dont u try to parameterize URL

url = Datatable.Value("url",dtGlobalsheet)
Dim  QTPApp ' Declare the Application Object  variable
Set QTPApp = CreateObject("QuickTest.Application") ' Create the application object
QTPApp.Test.Settings.Launchers("Web").Active = True
QTPApp.Test.Settings.Launchers("Web").Browser = "IE"
QTPApp.Test.Settings.Launchers("Web").Address = url

Hope this is the simpliest way, Just change the URL in the datatable before executing the script by passing the value from datatable

Thanks,
kamal

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions