Considering practical scenario where user has to perform same test on different test environments like QA, UAT and Pre-Production etc. So instead of creating duplicate test cases, it can be done very conveniently with the help of 'Get Variable' building block and Scheduling on LEAPWORK which helps in saving time and effort.
Please follow the below steps as to how it can be achieved:
1. Creating a simple test case with 'Start Web Browser' building block which gets the URL parameter with the help of 'Get Variable'. The scope of the 'Get Variable' building block must be 'Schedule' as it will hold the Url value as per the schedule called.
2. Create Scheduling for the different test environments selecting the same 'Case to run'(i.e test case name) and the suitable environment on which user has to run the script. User has to pass the Url parameter and value in the variable section of the scheduling window. The variable name must be same as used in the test case above for e.g "Url" and the Url value it will hold will be different for the different schedule created as shown below:
For Schedule 'QA':
For Schedule 'UAT':
Now when the test case is triggered as per the schedule called, it will pass the Url value accordingly to the 'Start Web Browser' via 'Get Variable' building block and execute the test cases.
For any clarification, please contact our Priority Support.