Question
Apple Inc
IN
Last activity: 13 Sep 2021 2:58 EDT
Scenario based testing - How to pass user selected value at runtime to click event
We have a dropdown which has values as 1,2,3 and displays A, B, C in the UI in DEV environment Ex: A-1 (DEV) A- 5 (Other higher environment) B-2 (DEV) B- 6 (Other higher environment) C-3 (DEV) C- 7 (Other higher environment)
While selecting any value from dropdown, on UI as it shows the text value A,B,C and upon selection it will update the properties with corresponding values in background i.e. 1,2,3.
For the same UI value in the dropdown in other environment/s the code gets changed i.e. 5,6,7, due to which at run time the captured value is expecting the code as 1,2,3 and ultimately fails. Currently, we have to go to each environment and update the values accordingly in the test cases which is tedious work. So. Can we get these values dynamically by relying on any clipboard pages at runtime so that the test case does not fail.
So, the question are, a) Can we read "Named Page" (may be pyWorkPage or user defined page) from the clipboard where this value is already associated and get that value at run time? b) If we source "Dynamic" with our own Data Page then it is throwing an exception in the background.