Is there a way to skip the dialog box when running online?

Old thread, but if someone is looking for a “OK-Button press”-solution (I was), this might be useful. Just use the code below in a JS-Only-Before-Experiment-Code-Component

var checkOK = setInterval(function() { //Use basic nested setInterval for Status check of dialog
    console.log("Check if DialogBox loaded");
   if (document.getElementById("progressMsg")) { //Wait for ProgressMsg to exist
        console.log("Dialogbox exists."); //Dialog Box Ready
      var statusText = document.getElementById("progressMsg").innerHTML; //get Status of ProgressMsg
      if(statusText == "all resources downloaded.") //If status is good. Go and let JS Click the button
      {
      console.log("All resources were downloaded! Press Ok now...");
      document.getElementById("buttonOk").click(); // Click on the checkbox
      clearInterval(checkOK);
      }
   }
}, 500); // check every 500ms


The dialog box is clicked by JS-Code after all resources have been downloaded.

Best
Luke

1 Like