How to validate "cusomerAge" using property checkpoint
- 8 years ago
In the "Value" part of the property checkpoint, after it's been inserted, you can change the type of data to a "Code Expression" and then use various parts of the aqDateTime object to calculate someones age based upon DOB. Specifically, look into using the TimeInterval method (https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqdatetime/timeinterval.html).
While I understand the desire to not have "code", when you start getting into making tests "smarter" where they calculate and compare things to be more variable, you'll need to start working with some sort of code.
An alternative to a code expression is to use "Call Object Method" to call the different methods of aqDateTime to do the calculations as keyword operations but I personally find that more cumbersome. It's doable but it will mean adding a lot of operations to your test simply to do the calculation that can be done with a single code expression.