user17517240
user17517240

Reputation:

Running a JS script with Selenium IDE

I am trying to figure out how to run the following inside the Selenium IDE. The thing is that we have an input field where we add string "TEST" + the current hours and minutes without ":" in between. I am banging my head against the wall while looking for a close solution in search engines, but nothing so far. I have not that big experience in programming unfortunately, yet. Maybe someone could help me with this?

This is the idea that I need to run with Selenium IDE:

const hours = new Date();
const minutes = new Date();
console.log(hours.getHours().toString() + minutes.getMinutes().toString());

This needs to be inside here, as this is set up to check with, as example, "TEST1627" as input value, which is dynamic, and then second field, which is not important and is static: page screenshot with input field

Upvotes: 0

Views: 196

Answers (1)

user17538629
user17538629

Reputation:

Maybe this could help

const now = new Date();
console.log("TEST" + now.getHours() + "" + now.getMinutes());

Upvotes: 1

Related Questions