I am facing some issues with the code in my user extensions that is supposed to check the date. Here's the code snippet causing errors:
Selenium.prototype.doCheckDate = function(){
var dates = new Date();
var day = dates.getDate();
if (day < 10){
day = '0' + day;
}
month = dates.getMonth() + 1;
if (month < 10){
month = '0' + month;
}
var year = dates.getFullYear();
var prettyDay = day + '-' + month + '-' + year;
this.browserbot.getUserWindow().checkDate(prettyDay);
}
The error message I receive is: [error] this.browserbot.getUserWindow(...).checkDate is not a function
If anyone has any suggestions on how I can successfully verify the current date or future dates, please share your thoughts. Our system populates a date field with a date that is one or two years ahead of the current date.
Thank you in advance for your valuable time and assistance. Your help is much appreciated.