Jakemorley
6 years agoOccasional Contributor
Setting a variable as today's date
Anyone able to help me please,
I have avairable which needs to hold todays date plus a keystroke.
the date needs to be in the format dd/mm.
currently I manually change the variable whenever I am running my regression testing, for example today it is set to 02/10[Tab] which works perfetly for all my regression tests apart from the fact that I keep forgetting to change it until I am half way through my regression and error messages appear so I have to stop and start again after updating the date.
Anyone know a way where I can update the variable automatically with todays date? but without losing the [Tab] at the end
Thanks in advance :)
aqConvert.DateTimeToFormatStr is your key.
code is JavaScript but, hopefully, you get the idea.
var dateToday = aqConvert.DateTimeToFormatStr(aqDateTime.Now(), "%m//%d")
onscreenObject.Keys(dateToday + '[Tab]')