I have two two applications. So two url, one for production and one for development(Eg. www.production.com and www.development.com)
I am using a pop up box in which user can enter either prod or dev, depending upon what user has selected, I want to open the respective browser.
Default value is dev in pop up box so I have given www.development path in the record and run settings. But if user changes the value in pop up box to production then how do I change the url to www.production.com.
Please let me know how to do this.
Thank you in advance.
Made a user defined environment under "Test" -> "Settings" -> "Environment" TAB -> "Variable Type = User defined". Where I defined all 5 environments as
and ticked of the "Load variables blablabla" box and exported it to an XML file.
The test was recorded in ST environment, and now when I change the "Record and Run settings" under "Test" to the "Dev" environment, everything crashes.
In addition, we use dynamic links, so I had to change the "Object Properties" when I navigate so it uses the "HREF" tag instead of the "Text". And that "HREF" tag is defined as "http://st.mywebsite.com/mysearch"
This is most probably why it crashes, because it doesnt use the variable "http://dev.mywebsite.com" but still uses this one "http://st.mywebsite.com/mysearch".
Any good clues about how to overcome this challenge??
We don't use the test > settings as they are too inflexible.
We have an external environment value called ENV and we put an Identifier in there which is passed to the function below. To run on a different environment just change the external environment variable. You could put it in the global datatable if you don't want to use env vars:
' Open Browser
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = true
' Set Correct URL
Select Case Environment("ENV")
siteURL = "http://uat.mywebsite.com" ' UAT
siteURL = "http://st.mywebsite.com" ' ST
siteURL = "http://dev.mywebsite.com" ' DEV
siteURL = "http://prod.mywebsite.com" ' PROD
siteURL = "http://test.mywebsite.com" ' TEST
Reporter.ReportEvent micWarning,"Launch Browser","Environment Identifier "&Environment("ENV")& " Not valid"
' Navigate to Portal Homepage
IE.Navigate SiteURL 'Open the appropriate URL
After doing some reseach, the only thing I can find on External ENV is what is referred on page 222-225 in the professional guide. (v 8.0.1) And that uses the "Test" -> "Settings" which just was said where inflexible. (So I do not think the previous post was referred to this)