UiPath Studio ( Error HRESULT E_FAIL... )

Hi,

I’m getting the following error: Error HRESULT E_FAIL has been returned from a call to a COM component. everytime I try to run a robot from a current project.

This same workflow that I’m running in my computer, it works on two other differents computers. Not on mine though.

Here’s a screenshot of the workflow:

Basically, the robot can enter on the LogMessage activity but once he gets into the ElementExists he stops running and he gives me that error. The ElementExists activity is being used to simply check if a certain Internet Explorer page is open.

Thanks in advance.

1 Like

Hi,

Before checking for element exists please try to get some text form that page and see.
Or please check what is the browser type in selector for element exists, other wise please provide the selector for element exists.

Let us know if this helps.
Regards,
Pavan H

Hi @pavanh003,

So… I added a GetValue activity plus a LogMessage before the ElementExists activity and yes, I extracted the text from the form with no problem. Once it entered the ElementExists, he entered on the Catch and he gave the same error message of before.

The selector from the ElementExists activity is:

<wnd app='iexplore.exe' cls='IEFrame' title='Création de prestation*' />

Cheers.

Hi,
Can you please check the browser where you are trying to check the element exists.
For element exists the selector for IE will be like html title=‘iexplorer.exe’ …

Can you please check once.

Regards,
Pavan H.

Hi @moreirasa1,

What is the error message its giving, have you mentioned boolean variable in element exists activity.

Hi again @pavanh003,

I’m not sure I understood your question… like I said, the selector from the ElementExists related to the IE browser is:

<wnd app='iexplore.exe' cls='IEFrame' title='Création de prestation*' />

I do highlight with UiExplorer and he can detect it so…

Hi @anil5 ,

The error is exactly this one: Error HRESULT E_FAIL has been returned from a call to a COM component

The bElementExists gets true but then he enters the exception where I get the above error in bold.

image

Hi,

The error is because the element might have not loaded properly and because of which the element exists property throws error, can you try wait for ready property as complete and increase seconds in time out property and try once.

Or may be try reinstalling the .Net framework version.
Regards,
Pavan H

Hi @pavanh003,

I changed the WaitForReady property to complete and I also change the timeout for the double and the error keeps happening.

Can’t uninstall the .Net framework either due to compatibility issues for the moment.

Hi,
Are you running the bot in chrome or in IE?
Regards,
Pavan H

I’m running in InternetExplorer @pavanh003, v11 to be more specific.

Hi @moreirasa1,

Can you provide your workflow if possible, if not can you explain what you are trying to achieve and what (WS Creation Webpage) has.

Hi @anil5 and @pavanh003! First of all, thanks for your will to help me. It seems that I found a solution, which I will detail here:

Basically, my “WS (Création Webpage)” was an AttachWindow activity with a bunch of activities nested inside, the goal was to find a certain webpage with ElementExists and then… in that same window, perform a series of tasks on that window.

What I did was:

  1. I deleted the AttachWindow and instead, I put everything on a single sequence. So, no more attach window.

  2. Also, another thing I did was making a full selector… all the selectors before didn’t had the < html title="blahblahblah "/ > because of being on an AttachWindow. The error was ocurring on the GetValue activity without the full selector.

In a nutshell, I still don’t know what was the cause of the problem… but this trick solved. No need to uninstall .Net framework whatsover. If interested, I can later on provide a workflow sample for you guys to replicate the issue.

Cheers.

4 Likes

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