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

166
Vistas
Change element value in nightwatchjs

As part of my nightwatchjs test script, I would like to change the value of an element on the page in order to stop a pop-up from appearing on a subsequent page.

The html is as below;

div id="newsletterSignup" class="newsletter-signup" data-page-view-threshold="3" style="display: block;"

So in this instance, on the 3rd visited page, the Newsletter popup would appear.

However, I don't want this popup to appear, so my idea was to change the data-page-view-threshold="3" value from 3 to 50.

This way, my test script would finish before 50 pages were visited and the popup would not be displayed.

However, when I tried using the getValue command in Nightwatch on the element #newsletterSignup[data-page-view-threshold], it returned the value as null.

Hence, using setValue command didn't work, as the current setting of 3 doesn't seem to be an actual value.

Is there more complicated that I was hoping, or am I missing something obvious somewhere?

Any help in this would be greatly appreciated.

about 4 years ago · Juan Pablo Isaza
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