I'm having trouble figuring out how to execute JavaScript within the Selenium IDE. The objective is to enter text into an input field, with a backend setup that verifies the current time in the input field for testing purposes: Here's the input field that needs to be filled
It seems like this approach isn't working at all: Shown in the Selenium IDE screenshot
The text that needs to be entered into the input field is "TEXT" + "hhmm", without including ":" (Please note that the correct format should be hhmm, not hhss as shown in the screenshot).
I'm attempting to accomplish this task using the Selenium IDE. However, I am new to JavaScript, so I would appreciate any suggestions or one-liners to achieve this.
const now = new Date();
console.log(now.getHours() + "" + now.getMinutes());
This is the closest solution I have come up with so far, but I am only able to return a TEST string instead of the complete desired output. View in Selenium IDE
Any advice provided would be greatly appreciated! Thank you!