techgirlbb
8 years agoContributor
Keyword Test_Current date text field is prepopulated with today's date_how to validate the value
In my windows application I have text field prepopulated with Current date. I inserted property checkpoint and selected "value" property but when I rerun tomorrow it will fail.
My am thinking to writing function to get sys date and pass the Text field value to Variable and compare both. But My team doesn't not want any coding..
How can I validate it using check points
When you edit the checkpoint, you can change the parameter to be a code expression. Use
aqConvert.DateTimeToFormatStr(aqDateTime.Now(), '%m/%d/%Y')
This will return a date in the format of mm/dd/yyyy using the current date.