How can I use the same scripts for a test in a different environment without changing the scripts line by line.
If you know the way, or have used, would you be able to share / explain in an elaborated way please
|
Change of Enviroment
|
|
How can I use the same scripts for a test in a different environment without changing the scripts line by line. If you know the way, or have used, would you be able to share / explain in an elaborated way please
02-10-2011, 12:34 PM
Code: Dim env
env=environment("OS")
msgbox env
If env="Microsofr Windows XP workstation" Then
{Your script here}
else
{Mention other condition}
End IfThe condition maybe OS,User name,configuration etc.
02-11-2011, 08:34 AM
Hi Nancy,
You can use the 1) Environment variable : with URL 2) Use Global Sheet : To change the application URL 3) Use external file where you can specify the environment name and URL I think this is the information what your are looking for..... If not let me know...
Thanks,
SUpputuri
02-16-2011, 12:59 AM
02-17-2011, 10:01 PM
We put all the dynamic information about our environment in an external file and use "Environment.LoadFromFile(fileName)" to load it into environment variables. We this for things like the URL of the test sever (it changes from time to time), product login information, account to log in to, etc. We have a global action "Login" that we use in every script that reads this environment file, starts the browser, goes to the test site, and logs in.
|
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| How do you Change Run mode mid script? | Caleytown | 6 | 8,826 |
03-25-2021, 08:27 AM Last Post: RB26578 |
|
| [UFT] Change property of object (WpfButton) | robertosalemi | 2 | 3,146 |
11-22-2016, 12:43 PM Last Post: Ankur |
|
| Dynamic change of name for Webtables | prakashreddy | 1 | 2,879 |
10-25-2014, 09:53 PM Last Post: supputuri |
|
| How can I change my test folders, globally? | atester | 0 | 2,382 |
10-03-2014, 04:37 PM Last Post: atester |
|
| JavaDialog change every time i run my test | Pkapoor | 3 | 3,630 |
06-28-2013, 09:27 PM Last Post: Ankur |
|