Hello,
I need to test my Web Automation on different machines/ deployments.
The application to test will stay the same but the Base url will change.
I also do not want to spend much effort to adjust the Test Automation whenever the application base path changes.
For my User Code Modules this is simple.
I just need to define the Base URL in a common variable.
For repository items I have not found a good approach by now.
How can I automatically change the Base Path of the Repository?
Editing the Base Url of Repository items is not a good solution for me.
My first idea was to change the Url in the Init Method by User Code.
In the docu I see its not recommended to change the Base Url of Repository elements.
Thanks for any suggestions
Same repository for different Base path urls
Re: Same repository for different Base path urls
I don't know, if I understood your problem. Do you want to change the base url or the path?
If so, you can make either of these variable in your repository. Simply create a variable called "myBasePath" in the repository and initialize it in your code module by using something like this:
Read the topic on "Using Variables within the Repository":
http://www.ranorex.com/support/user-gui ... html#c2970
Regards
If so, you can make either of these variable in your repository. Simply create a variable called "myBasePath" in the repository and initialize it in your code module by using something like this:
Code: Select all
repo.myBasePath = "/machine1/myApp"
http://www.ranorex.com/support/user-gui ... html#c2970
Regards
Re: Same repository for different Base path urls
Thanks for the hint.
I set the domain attribute of the required Repository item(s) in the Init method of the user code.
I bound the domain attribute to a Ranorex variable which is set to a unique common string in Init.
This works.
I set the domain attribute of the required Repository item(s) in the Init method of the user code.
I bound the domain attribute to a Ranorex variable which is set to a unique common string in Init.
This works.