Javascript Confirm Popup on click command does not click [OK] all the time

I tested your script to click confirm popup with the “Click” command and it does not work all the time.

Here is how to reduced the error on chrome

  1. Run your script below → it loads the page and click the [OK] button from the popup
  2. Comment the “open” URL command out so that it is not called again
  3. Refresh the page pressing the F5 button
  4. Run the script again (this time without a fresh call of the page) → it presses [Cancel Button]
{
  "Name": "popup1",
  "CreationDate": "2025-2-2",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://testpages.herokuapp.com/styled/alerts/alert-test.html",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "id=confirmexample",
      "Value": "",
      "Description": "Opens dialog, but uivision catches it and closes it"
    },
    {
      "Command": "storeText",
      "Target": "id=confirmexplanation",
      "Value": "a",
      "Description": "Extract result text from website"
    },
    {
      "Command": "echo",
      "Target": "text=${a}",
      "Value": "green",
      "Description": ""
    }
  ]
}

That is a very good test case, thanks for it. We will debug this further.

This issue is fixed with the V9.5.3 release. Thanks again for the useful test case :slight_smile: