TestPartner verify values in text fields
1. Create a new visual test.
2. In the Start step create 2 local variables, e.g. myVar, and myVar_Verification_Result
3. Create a new ActiveData asset to hold the values from your Excel file that you want to compare against the AUT properties. E.g.
4. In the visual test Start step click the Browse for ActiveData button and insert the new ActiveData asset.
5. Right click on Start step > Insert > Property from Control
6. Click the identify from AUT button and Identify the control where you want to verify the text.
In this example the text field containing “One Two Three” was identified.
7. Select the property name that you want to verify from the list, e.g. Text
8. Choose the Local variable name in which to store the value, e.g. myVar
9. Right click on Step 2 and Insert > Expression
10. In the Expression designer set the following options:
11. Create the expression as follows:
Type “=” (from the keyboard)
Click “Add as” (choose Text from the list for this example)
The expression created is:
12. Click OK
13. Playback the visual test and then view the results - to check that the verfication is successful.
The expression returns "True" which indicates that the expression was true (the string value was expected).
14. As a test, change the value in the ActiveData file to an unexpected/incorrect value.
E.g. “Four Five” instead of “One Two Three”
And playback the visual test again - check that the expression returns false (the string value was unexpected).
15. Repeat the above steps for any additional text fields which need to be verified, or alternatively copy and paste the relevant visual test steps, and modify them to reflect the required control details and ActiveData columns