JSON Code for Web Automation - REFRESH Command

I’ve designed a macro with a “Refresh” command, preceded and followed by “Pause” commands to allow sufficient time for loops to execute smoothly. However, the “Refresh” command occasionally fails with the error message: “Error #210: ‘refresh’ failed. No page load event detected after 10s (!TIMEOUT_WAIT). Error details: Error #220: Still same ipc secret.” This issue intermittently occurs.

Therefore, can anyone help me out with the issue?

Increase this value !TIMEOUT_WAIT to 30 or more for Refresh command only

I advise you not to use the refresh command but to use the OPEN command to reload the page

Thank you for providing me with the solution. But can you just tell me why shouldn’t I use the REFRESH command?

And also please provide the OPEN command to the REFRESH page. Thank you.

When you use the REFRESH command or selectWindow | TAB=OPEN it happens that ui vision loses control of the tab it is working on, generating errors, therefore a good automation should avoid these commands because it can happen that during the loading of the tab ui vision loses control and reports errors.

Yes, indeed, ui.vision loses control when you open and close tabs automatically. At first it worked fine until it reaches a point where it stops due to internally generated errors.

Ok, so what should I use the command for the REFRESH page?
As of now everything was working fine but suddenly it got stuck on the REFRESH command.

I recommend that instead of the REFRESH command you use the open command (on the same tab) it seems more stable and ui vision rarely loses control of the tab using the OPEN command. If you use the REFRESH command set a !TIMEOUT_PAGELOAD with a high value of 120-150 seconds

Thanks for your solution. Actually, I had set the REFRESH command with a high value of 140 seconds. It worked successfully for the first 3 loops and as it entered 4th loop, it dropped the connection and macros got stuck there only.

Therefore, can you provide me the code for OPEN command to REFRESH the page?

With this code you can save current url and load url in same tab

I use ui vision for firefox and working, i think working in Google Chrome too

{
“Command”: “executeScript”,
“Target”: “return (window.location.href)”,
“Value”: “href”,
“Description”: “Save Current Url”
},
{
“Command”: “open”,
“Target”: “${href}”,
“Value”: “”,
“Description”: “Load Current Url”
},

Let me try with the above code which you have given.

If you still notice errors after the OPEN command, add PAUSE with several seconds, do some tests, the important thing is that when the page is slow to load that ui vision does not execute commands otherwise it goes into error, ui vision must execute the commands after the page is fully loaded