I´ve got a really really enjoying problem. A process is using a internal map (so I can´t link to the website…), that will load filters etc using Javascript.
The problem is that there is absolutely no way to se if the map is loading or not. There is no possibility to get any selector that indicates that the website is loading.
I have tried to use Inject JS activity to no avail. I have tried to get a working script with ChatGPT for countless hours (well at least 10+).
The problem arises when the Internet may be a bit slow and the filter don´t have had enough time to load before the process continues.
If you can’t get any element or attribute that shows if filter load or not, you can use Retry Scope activity and put the activities you are using for select the filter into it.
In Retry Scope activity you can add x times and retry interval
Another is using click or type into modern activities with verification option where it verifies if the required action is completed else retries the same action again
How would that help me do you mean? Im sorry but i do not really follow. How can i verify the action is completed when i can get any attribute or selectors for the loaded fiter ex.?
In the filter ypu would be selectingb a value right…add that to the verify execution so that it will check if the filter has been executed or not…if not executed then it would retry to set the filter again
Hi
Can you check if after you applying the filter, the url changes ? Maybe using F12 (devtools) help you to investigate if there’s something that you can use it
For Inject JS Activity you can try this
function checkState() {
// Assuming ‘mapLoaded’ is a JavaScript variable that indicates the loaded state
return (typeof mapLoaded !== ‘undefined’ && mapLoaded === true);
}
return checkState();