Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

251
Vistas
Running JavaScript script inside the Selenium IDE

I am stuck a bit with figuring out how to run the JavaScript inside the Selenium IDE. The goal for this is to be able to send this to the input field, we have a setup in the backend that is also checking for the current time in the input field for testing purposes: Input field that needs to be filled

Seems that this way it does not work at all: Inside the Selenium IDE

What needs to be sent to the input field is string "TEXT" + "hhmm" without ":". (sorry that included hhss in the screenshot, the right is hhmm).

I am trying to get this inside the Selenium IDE. Yet, I am beginning with JavaScript, so maybe there could be some suggestions on some one-liners?

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

This is as close as I could get, but I cannot return the whole thing, just a TEST string. Selenium IDE

Thanks a lot for any provided advice!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Just found the answer to my own question, but sharing this with you and for my own reference too if there is a need for such information as there are not that much examples on the net.

So, in order to return TEST and current time with all the zeros in time we need to run the following line and store it in IDE:

javascript{"TEST" + new Date().toTimeString().split(':').slice(0,2).join('');}

Then as below, echo the ${returnTest} which is a Value of the stored script and then send the information to the input field.

enter image description here

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda