As a beginner in Selenium, I am currently exploring the Selenium tool: beginners guide book to learn more about it. The book explains how to utilize the Selenium IDE Extension by using a .js file to store JS functions.
An example provided in the book was saved as a user-extension.js file and is defined in the Selenium > Option > Selenium IDE extension field. However, upon restarting selenium, I encountered the following error message:
"error loading Selenium IDE extensions: ReferenceError: Selenium is not defined"
The example code I am attempting to use is as follows:
Selenium.prototype.doTypeTodaysDate = function(locator){
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.doType(locator, prettyDay);
}
Any assistance on resolving this issue would be greatly appreciated.
Thank you for your help!
Rohit