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.
Exception Type: UiPath.Core.ElementOperationException
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)
Could you give me a hand ? to solve this please?
Could you please share the website (as it seems to be a public one) together with your Studio version and packages versions?
I would first advise you to update the UiPath.UiAutomation package to the latest 19.7.0 version and see how it goes then
yeah it was updated !!!
Website : https://www.w3schools.com/
i need a aaname and innerText of Button element “Learn HTML”
using find text position activity and using that uielement to get attribute
Share the workflow if possible
Somebody help me on this !
Could you check this project?
GetAttributes.zip (5.2 KB)
It worked for me without any issue.
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.
just look into the workflow what i have done and tell me what went wrong guys,
Attribute.zip (13.1 KB)
Interesting, it seems annoying.
I used the Highlight activity and it seems like the entire page is getting highlighted:
I suppose this is why it doesn’t work. I wonder if it would work with a different button.
yeah this case is eating my head !!!
is there is any other way to solve this use case ??
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 !
You can search by specific things or general ones, see here:
Attribute.zip (61.5 KB)
And the filter argument of the Find Children activity:
Thank you so much @loginerror