Issue 1: I’m trying to find the position of the text and result is an Uielement, then i was trying to print the Inner Text attribute of that uielement, It was throwing an error.
**Note:**then , If i give Attribute “aaname” and some other attributes were showing correct results.
Issue 2: i am clicking on a button called “Learn Html” i need aaname of an element. If am using get attribute activity and indicating that element directly it was giving correct aaname Say (Learn Html) and another way like using find text position input is “Learn html” and passing the uielement to get attribute to get aaname it was printing “W3schools web tutorials” title of the page
I dont know why!!!
Source: Get Attribute (Get Attribute)
Message: Attribute not supported by the current UiNode.
An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
UiPath.Core.ElementOperationException: Attribute not supported by the current UiNode. ----> System.Runtime.InteropServices.COMException: Attribute not supported by the current UiNode.
at UiPath.UiNodeClass.Get(String bstrAttr)
at UiPath.Core.UiElement.Get(String attribute, Boolean refresh)
— End of inner ExceptionDetail 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)
@loginerror
yeah for me also its working. this is not a issue here.
Assume that i have only have text (String) to check in a webpage. so i am accessing a w3schools of given link and then i am using that string or text to the input of find text position activity and i’m trying to print the attribute results (say aaname and innertext)
For aaname result is : w3schools online tutorial (Which is not expected) actual output is (Learn HTML)
For innertext attribute throwing error as Attribute is not supported by the current uinode.
so share me a workflow to first to find the element (using any activity like find text position) and i need the all attributes with actual results without an error if possible.
Thank you so much for your response and your time.
It seems like the activity Find Text Position will always return the parent selector instead of the one for the specific element. Debugging it shows it well:
My question here would be - is it possible to use the Find Element activity instead? You could use a variable in the selector for the particular text.
However, this will not work if selectors do not have the text value (Find Text Position usage hints at that scenario).
However, I am confident it is possible to be automated one way or another. Could you maybe elaborate on the particular scenario? I suppose the W3 website is just the example of the underlying principle. Maybe we can find a workaround.
Actually principle is same in my project. i have string array which contains number of strings and with use of for each i need to check the element is present in the webpage if true i want an uielement(variable) for that element (It may be a button , hyperlink,text or select item in dropdown ) with that uielement i need all attributes of that element (say aaname , innertext …etc)
As long as the element has this text in a selector, you can use the Find Children or Find Element to find it. You will just have to specify the text as part of the selector dynamically using a variable
yeah you are correct ! but i have a question that it may be any form of element in a webpage (say forms,buttons,dropdown and hyperlink) so tell me a thing every element selectors will be different format right? if i give dynamically with a variable will it really works?
Sorry for so much questions!!
If possible share some sample workflow !