TestPartner verify values in text fields

TestPartner verify values in text fields

Here is an example visual test to compare text values of 3 different text fields against the values stored in an ActiveData file.  The text fields and ActiveData (Excel) file are shown below.

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.

Click OK

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:

Click “Add”

Type “=” (from the keyboard)

Click “Add as” (choose Text from the list for this example)

Click “Test”.

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

Incident: 2691098


Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Version history
Revision #:
1 of 1
Last update:
‎2014-04-11 09:14
Updated by:
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.