I’m studiyng Selectors in ‘RPA Developer Foundation Training’ course, and in Lesson 3 - The UiExplorer, there is a video demo that teaches how to use Property Explorer.
I replicated the steps thoroughly but my workflow crashes when I click the “Start” button on http://rpachallenge.com website, occurs a Runtime Execution Error:
19.12.0-beta.61+Branch.release-v2019.12.0.Sha.c5ef64a84dd6be2c140a75da8fd036824faab942
Source: Wait Attribute
Message: Error HRESULT E_FAIL has been returned from a call to a COM component.
Exception Type: UiPath.Core.ElementOperationException
RemoteException wrapping UiPath.Core.ElementOperationException: Error HRESULT E_FAIL has been returned from a call to a COM component. ---> RemoteException wrapping System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
at UiPath.UiNodeClass.Get(String bstrAttr)
at UiPath.Core.UiElement.Get(String attribute, Boolean refresh)
--- End of inner exception stack trace ---
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
I Try to run this project on Windows 10 x64 and Windows 7 x86 and the result is the same. The browser is Internet Explorer on both. I Attached my Main.xaml.
Your selector for the Start button is invalid. Since it is not in the Attach or Open Browser scope, having an incomplete selector will fail. This is also not an ideal way to start the process.
I recommend visiting academy.uipath.com and taking the Production Ready Essentials training to learn more about how you can get this information. There is a section discussing how to build web browser automation, and I believe one of the examples they use involves rpachallenge.com.
Thanks! I was able to replicate the error. Strange that this only seems to happen the moment the text is updated to the expected value.
Apparently this issue is related to Internet Explorer. One way to get around this issue is to set ContinueOnError to True. Otherwise, you can use a different browser, change the version of Internet Explorer, handle the exception in a Try-Catch block, or use another method to determine that the process should start.
There are a lot of options, and with something like this, I recommend whichever option simplifies the code the most.
There are several solutions, but the one you use depends on how you want to approach it. The easiest method is to set ContinueOnError to True for the WaitForAttribute activity.
Hi Anthony, I got the same errors as @renatomendes and @Ivan_Balashov. I also tried with Chrome and Wait attribute doesn’t work. I’m thinking it’s a UiPath bug. Of course there are workarounds, but the problem appear in a Demo to learn UiPath, and make the students lose time and doubt if is are them who did some mistake. Is a pity, in this demo there aren’t any project to download, to be sure where the mistake comes from.
I agree, but for what it’s worth, other software has this same problem. I’ve played around with UI.Vision, and there are times when it does not detect the elements as well. This leads me to believe that it’s a tricky bug to deal with.
I scratched my head for nearly half a day on this and finally found this page to know it is potentially a bug!!!
I have debugged this in detail, and notice the following:-
The myButton variable that was tagged to the first button on the page prior to the click did not change the value from “Start” to “Round 1”.
Worst of all, after the WaitAttribute function finishes, and following the recommendation from a forumer here to set ContinueOnError to true, the selectors are now empty for myButton.
Moreover, the strangest thing is, when I copy the original selector for the button and manually write this string to the Highlight activity, on the screen, it appears to highlight something different (basically, a space above the “Start/Round 1” button). This tells me there’s either a recognition issue, or something is off.
What I have done to fix this is the following:
After the page is click, I do a find element again and refresh the content in the myButton.
I manually extracted the attribute (can use “aaname, text, innerText or anything relevant”) and check for the “Round 1” text.
If it is true, I then perform the Highlight, passing in the refreshed myButton variable, and it works.
It’s a cumbersome solution, but I suspect that’s what waitAttribute would be trying to perform…
Hopefully there’s response from UIPath on this problem, and strange that of all files for downloads, the files for this particular tutorial is missing.
Ok. I had a different approach in the Wait Attribute problem and it worked here.
I put 2 different Find Element in the sequence. The “Find Element” number 1 identify the button Start in the RPAchallenge portal and the second one have it’s Selector’s “aaname” as “Round 1”.
The Wait Attribute is linked with the Output of “Find Element” number 2 that has already the “Round 1” as a selector.
I don’t know if this is the ideal solution, but it worked. I hope this is helpful, because this problem was really frustrating for me