Automation error I don't understand

Hi, I’m not sure how to troubleshoot this error. This automation process was created by an employee that has since left the company. This error doesn’t stop the process from completing, but my supervisor thinks it could be causing some issues in Orchestrator. Any advice/help on how to resolve this is appreciated.

“Invoke or BeginInvoke cannot be called on a control until the window handle has been created”

I had to use Steps Recorder to catch this error while the process ran. THis is the best I have. Let me know if there’s a better way to get all the information about the error:

image

Thanks

Hello @Brandon_J,

The error message is stating that you cannot run any kind of action on a Window before it has been created. Some step in your automation is getting ahead of the curve and trying to run something when it does not have the actual window present.

Typical cases of this would be a form that is created but is not yet presented on the UI. Similarly, when a form is closed, its window handle is also disposed off .

If you used the Step recorder to catch the error, the next thing would be to understand what the previous step was, and what is it that the Robot was trying to do in the current step before it failed.

Simplified Example: What if a login page has not yet opened and your Robot is jumping ahead to click the Login button that does not exist because it’s parent (the Browser) hasn’t yet materialized for the Robot to start the login process.

1 Like

Thank you Andy. This was a very easy to understand explanation.

~WRD000.jpg

Thanks @Brandon_J .
I hope this helps you to have a solution to the issue you are facing.

:+1:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.