cancel
Showing results for 
Search instead for 
Did you mean: 

Exception has been thrown by the target of an invocation

EugeneG_
Level 2

Hello Everyone,

 

Process sometimes hits this type of exceptions when it tries to click certain buttons in Edge:

Exception has been thrown by the target of an invocation.

There is no consistency in this error, and it does not happen all the time, hence challenging to reproduce it manually.

BP version: 7.0.1

Example of the attributes used are shown on the picture. 
Tried to reinstall .NET Framework on the machine - it does not make any difference and the error still happens occasionally.
Any ideas, folks?



------------------------------
Ievgen Gudin
------------------------------
2 REPLIES 2

Dan.Lister
Level 4
Hi, 

I had the same issue for a client and it became quite a big problem for us. I found that changing from Browser mode to UIA mode and using Global Clicks got round the issue with the buttons. As you say, the problem was intermittent and seemingly random. The system we were using was quite dynamic so the different elements on the page could change state and I got the impression that the initial wait stage was finding the element and then the page was changing slightly when it came to the navigate stage and the element was no longer in a state that allowed it to be clicked. When I inspected the element using the Chrome developer tab, you could see lots of similar elements, many of them with attributes that meant they were invisible or disabled. You could maybe use Xpath to try and specify any attributes that could disable the element.

I also experimented with a double wait stage at the beginning of actions to wait for the element, sleep for a second and then wait for it again. This helped, but obviously impacted the speed of processing. Can I ask what application you are automating?

------------------------------
Dan Lister
Developer
Arvato
Europe/London
------------------------------

Hi Dan, 

Thanks for your advice. 
The app name is Peoplesoft.

Thanks, 
EG

------------------------------
Eugene G.
------------------------------