cancel
Showing results for 
Search instead for 
Did you mean: 

Test vs Prod HTML Path difference

RonAng
Level 5
How do you approach this problem? I'm working with a web application. I need to read a field. I can spy it as html and use id or path to access it. However, id and path of Test vs Prod are not the same. Thus, when we move to Production, we encounter issues. Can't use Active Accessibility as there are too many matches. A lot of similar fields. And of course, avoiding to use Surface Automation. PS. it would also help if you could share your tips on how you handle Test and Prod differences which are not limited to HTML Path.
2 REPLIES 2

John__Carter
Staff
Staff
If each version of the path is constant in Test and Prod, then you could make the path attribute dynamic and supply the value from the diagram rather than hardcode it in App Modeller. In the diagram you would have a decision to decide which path value to use. And you could also have an Environment Variable called 'Environment Name' with a value of Prod, Test or Dev. Alternatively, you could have more than one version if the same element in App Modeller, ie one for Test and one for Prod. Then use a Wait stage with 2 conditions, one for 'Check Test Element Exists = True' and the other for 'Check Prod Element Exists = True'. If the path flows along the first condition then you use the Test element, if it flows along the second, you use the Prod element.

RonAng
Level 5
Thanks John! I opted for the first option - using dynamic path.