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!
document.getElementById() method.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.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);