DOM failed to be ready in 30sec

Hello,

I understand there have been a number of topics on the issue so I apologise for raising it again. I did try and implement some of the suggestions but to not avail. I also uninstalled and reinstalled the extension as per the Admin’s instructions.

I am trying to run the same script on a number of tabs on Chrome, when I get to the second or third tab it will throw the E225: DOM failed to be ready in 30sec error.

If you’ve been a long-time user of UI Kantu such as myself you may have ran into the Error #101: UI. Vision RPA is not connected to a browser tab a few times, to me, it’s very similar because if I manually refresh each tab (like I would back then) then the script works fine, but to me this is not an ideal solution and can slow down your productivity.

Admin, you asked on another thread:
After this error happens, if you click PLAY again, does the macro then continue to work? Or do you need to close and open the browser?

In my testing it would run the script again, on the same tab (third tab) and become stuck at the same line (Line 4: selectWindow | tab=${i})

The only difference being the error message on the 2nd attempt is
[error][ignored] Line 4: E225: DOM failed to be ready in 30sec

Rather than,
[error] Line 4: E225: DOM failed to be ready in 30sec.

That was thrown the first time.

Below is my script, any help or suggestions to improve my script would be greatly appreciated.

{
  "Name": "SP - Calendar - Edit Item",
  "CreationDate": "2025-2-4",
  "Commands": [
    {
      "Command": "store",
      "Target": "1",
      "Value": "i",
      "Description": "Initialize loop variable i"
    },
    {
      "Command": "store",
      "Target": "true",
      "Value": "!errorignore",
      "Description": ""
    },
    {
      "Command": "while",
      "Target": "${i} <= 30",
      "Value": "",
      "Description": "Loop through all 30 tabs starting from tab 1"
    },
    {
      "Command": "selectWindow",
      "Target": "tab=${i}",
      "Value": "",
      "Description": "Switch to tab ${i}"
    },
    {
      "Command": "store",
      "Target": "false",
      "Value": "!errorignore",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"Ribbon.ListForm.Display.Manage.EditItem-Large\"]/span[2]",
      "Value": "",
      "Targets": [
        "xpath=//*[@id=\"Ribbon.ListForm.Display.Manage.EditItem-Large\"]/span[2]",
        "xpath=//span/a/span[2]",
        "css=#Ribbon.ListForm.Display.Manage.EditItem-Large > span.ms-cui-ctl-largelabel"
      ],
      "Description": "Click on Edit Item button"
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return Number(${i}) + 1",
      "Value": "i",
      "Description": "Increment loop variable i"
    },
    {
      "Command": "endWhile",
      "Target": "",
      "Value": "",
      "Description": "End loop after processing all 30 tabs"
    }
  ]
}

Thanks for the detailed post. First question: Does this error happen always or only sometimes?

As one suggestion to try: Replace the Click with an XClick + image or XClickText - does this solve the issue?

I’m really sorry but it looks like I can’t replicate the error at this time and all is working as normal! Which is a good thing :grinning: !! I will keep this thread bookmarked in the event I run into it again. I should note that I had only just installed / started using UI Vision again this week as I am back to doing some process heavy work so perhaps something in the backend refreshed since we last spoke and all is working as normal.

1 Like