Hello,
Sorry for intruding, I used 9.1.6 before. These are annoying issues [sic], while rare, appear more unexpectedly than the spanish inquisition. I believe that there’s two of them and work in tandem:
-
UI.Vision appear to fail to get the Page Load signal from the tab and erroneously assumes that the webpage has timed out loading (or failed entirely, if timeouts are disabled) even if it is loading correctly. That is, the open
command just incorrectly fails or fails in a timeout.
-
On rare occasions when the stars align, UI.Vision just hangs execution when selecting or attaching to any tab, sometimes even to the current tab.
I suspect that this is rare because it require specific conditions (which we do not know) to activate and it is likely that the site they are loading causes the issues.
The first problem with open
can create infinite retry loops. It has a janky workaround by re-implementing the open
command via UI.Vision+JS using window.location
and pause | 100 |
then the waitForPageToLoad
command.
The second problem is tricky to workaround, as we don’t actually know what exactly is happening within the code that causes UI.Vision to fail to attach, (or search for the locator, as the error message suggest?)
Here is a test macro where UI.Vision shows similar symptoms as the original poster, using selectWindow
but hangs and not showing any timeout other than the “Stop” and “Pause”. Although, as of 9.1.9, it does timeout after 30 seconds.
Initial Conditions before testing:
- Machine is disconnected from the Internet.
- UI.Vision hasn’t been started, edited, or ran any macros yet. If so, simply, close then re-open Ui.Vision.
{
"Name": "Dubious Test",
"CreationDate": "2024-5-7",
"Commands": [
{
"Command": "selectWindow",
"Target": "tab=open",
"Value": "",
"Description": "This can stall for no reason and timeout to 30 seconds instead of the default 60"
},
{
"Command": "open",
"Target": "https://awebsitethatdoesnotexist.xyw",
"Value": "",
"Description": "Most often this just timeout but fail to get the error that the browser gets."
},
{
"Command": "selectWindow",
"Target": "tab=open",
"Value": "https://example.co",
"Description": "Also another site that does not exist and may also stall for no reason."
}
]
}
For some reason, modifying or rerunning the macro may let it count to the timeout. Not sure if disconnecting internet helps increase the likelihood of replicating the symptom.