Im using Brave Version 1.62.162 Chromium: 121.0.6167.164 (Official Build) (64-bit) with UI RPA 9.0.1, to periodically open a web page, checking if an element (button) is present, then clicking a button if it is there. I’ve removed the while and other looping and just given the meat here:
{
"Command": "store",
"Target": "true",
"Value": "!ERRORIGNORE",
"Description": ""
},
{
"Command": "store",
"Target": "15",
"Value": "!TIMEOUT_PAGELOAD",
"Description": ""
},
{
"Command": "open",
"Target": "https://REDACTED",
"Value": "",
"Description": ""
}, {
"Command": "store",
"Target": "true",
"Value": "!STATUSOK",
"Description": ""
},
{
"Command": "store",
"Target": "5",
"Value": "!TIMEOUT_WAIT",
"Description": ""
},
{
"Command": "assertElementPresent",
"Target": "id=otp-send",
"Value": "",
"Description": ""
},
{
"Command": "if_v2",
"Target": "${!STATUSOK} == true",
"Value": "",
"Description": ""
},
{
"Command": "click",
"Target": "id=otp-send",
"Value": "",
"Description": ""
},
It works well over half the time, but frequently it bombs, where this is what should normally happen if the button isnt present:
* [info] Executing: | assertElementPresent | id=otp-send | |
* [error][ignored] [Line 7](chrome-extension://gcbalfbdmfieckjlnblleoemohcganoc/popup.html#): timeout reached when looking for element 'id=otp-send'
I have it set up like that so as to be able to proceed with my RPA. But sometimes that if_v2 statement does return true even though the button is not actually there, then the whole thing bombs when it tries to click the button thats not there. I’ve checked the page source, sure enough that element is not present. So not sure why that if_v2 results in the wrong condition.
Besides that though, I suppose there probably is a better setup to repeatedly open a page up and checking if the button is there and clicking on it, and if not then waiting 30secs and redoing the whole thing. If so maybe I can work around this?