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

252
Vistas
How to Inject JavaScript in Web Page to Automatically Hit Refresh Button

I want to update the given dataset every 1 min. ideally, so far I've understood the best scenario is either every 1h or every 15min from Power BI. I've noticed, however, that if I click the 'refresh now' button in my workspace, then subsequently the respective dashboard and report will get updated every single time that button is hit!-although those pages need to be reloaded, this could be solved with tools like the Auto Refresh Plus extension that can do the job.

Hence, is there a way to embed JavaScript in the webpage of the screenshot below, that will automatically click the 'refresh now' button every e.g. 1min? The 'refresh now' button is just left to the 'Dataset' in the grey frame (it cannot be seen due to screenshot), right of the 'test_rig_dashboard'.

The most similar approach I've researched is this with the following JavaScript insertion:

javascript:if(window.autoRefreshInterval) { clearInterval(window.autoRefreshInterval); };
window.autoRefreshInterval = setInterval(function() { jQuery(".refresh").click(); },60000)

Any ideas on how can that be implemented here? I appreciate any help!

enter image description here

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

0

  • Right-click on element of interest and click "Inspect". Should open your browser dev tools where you can see something like this.
  • Right-click on the element's corresponding html and click "Add Attribute", then add an id attribute making sure it doesn't already exist. Your element should now look like this.
  • To verify that your element can now be selected, go to the console tab of the dev tools and use the document.getElementById() method.
  • Finally, use the click() method of your selection inside a setInterval() to simulate clicking on the element periodically like this. The second parameter is time in milliseconds, so in your case it should amount to 60*1000.
about 4 years ago · Juan Pablo Isaza Denunciar

0

For future users, just to add up upon @ptourlas answer, I achieved to do something similar by using only the class name of the button, since in this case, the button has no id. Skip the "Add Attribute" in 'Elements', and in 'Console' do:

setInterval(function(){document.getElementsByClassName("<class name>")[0].click();},30000);
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