I have a process that clicks in the below button ‘New’. Half of the times clicks there correctly
But half of the times it clicks on the Microsoft Square on the top left corner. Of course, this causes for the browser to open Microsoft window and the process fails
After clicking the ‘New’ button I’m doing a highlight & Print screen (in parallel) and I have also captured and error:
Highlight: The UI element you are trying to highlight is valid, but not visible.
I’ve tried different selectors, different machines, servers, robots,… the problem happens randomly.
I guess the selector being ‘not visible’ is maybe a clue, but I don’t know how to make it work reliably. Any ideas?
I remember this happening constantly in a BluePrism robot when interacting with a PowerBI website as well. Microsoft probably wants to avoid bots. I feel your pain!
Ok, that said, I do not have access to Dynamics to help you with a solution workflow. Here is my suggestion.
Have a Retry scope for the click (Action) event which checks for an element either New or (Alt+N).
If that element does not exist, then refresh the page and try again (click).
In the retry loop you could start with 3 retries and see how reliable it can be.
And you could also use try-catch method for handling the resulting exception. Just ensure that these loops of retries and try-catch do not go into an infinite loop.
Something like this:
Thanks @jeevith, what I don’t understand is what to use as a condition. I guess I should check for the ‘hidden’ selector, but I can not capture it, I mean I don’t know really what to look for.