I have been encountering the “Error HRESULT E_FAIL has been returned from a call to a COM component.” using the Get text activity after the “Navigate to” activity.This is during the assignment 1 of the Level 3 course.
I am looping through a series of URLs stored in a datatable. For every execution of the loop, I attach to the browser and navigate to the page successfully, but encounter this error. Without the navigate (when testing separately), the get text works fine.
I am using IE as my browser, and since I use windows 10, .net is integrated into the system. Any help would be appreciated.
Thanks for the reply @anil5. I am now using a browser variable. But the same error persists. I am testing this out with a simplified workflow, and I will provide the details below.
Step 1: Open Browser - will open and login to the acme site.
Step 2: The attach browser that holds the navigate activities to individual product pages and associated get text. There are 3 navigate statements and screen scraping after each navigate.
Always, the first navigate and scrape works fine, but the second onwards throw the “Error HRESULT E_FAIL has been returned from a call to a COM component.” error. Baffled by this. Is there some kind of resetting that needs to be done after every screen scrape?
The error is because of attach browser, can you remove attach browser and try.
Only navigate to activity and browser variable.
Because attach browser is expecting the start of screen, but after first navigate it lands on a different page and when attach browser and navigate comes the attach browser is expecting the first window where you have indicated the screen.
Thanks @anil5 , I removed the Attach browser, but the Hresult error still persists.
For testing, I just kept 1 navigate activity in the start, and used anchor to scrape 3 times. It worked. But when I use the navigate activity the second time, the get text activity fails. So I think the error is caused because of the navigate activity itself.
I even re-installed Uipath studio, cleared browser cache etc. Still the hresult error persists after the second navigate.
As suggested by you, I am not using an attach browser currently. But here is the selectors of the Find element inside the anchor activity. Since I am using the browser variable from Open, no other selectors are used in the flow.
Oh ok, I just checked the commented out Attach browser. I wasn’t using any selector on it, as I was using the browser variable from ‘open browser’ in the ‘attach browser’.
thanks @nadim.warsi. Have sent you the details. Though my code is now working after removing the find element and anchor and using just the get text as advised by @anil5.
There was no issue with Navigate to its working perfectly fine, the issue was with Find Element and your get text.
I have removed find element and get text and have put only get text activity and please find the expected result.
I have extracted the values for only one navigate to you can perform the same with others and one more thing i dont have these workitems so change to yours