In order for the GetAttribute activity to work the list item must be clicked and highlighted. So I am having it first click the list item and then do GetAttribute.
In addition, every time the page refresh and the list item is not highlighted, the GetAttribute activity selectors become invalid.It only works if i manually click on the list item.
It’s possible that your Robot is trained to only recognize the element when it’s highlighted or clicked on.
You must eliminate the attributes that deal with the highlighting aspects.
For example: When you click on it, it’s possible a CSS class in added to it . And when your page loads, that CSS class does not show up because the item isn’t supposed to be highlighted when the page loads.
Hi @AndyMenon, welcome to the forum and thank you for your inquiry.
Sure, please provide us details of the selectors, also the xaml you have so far in order to help you better, please add more details 'cause I’m having a hard time reading your problem
In order for the GetAttribute activity to work the list item must be clicked on,hence, highlighted as seen in the images. That’s the reason prior to the GetAtt activity there’s a Click activity, but it doesn’t work when the UiPath does it only when I click it. I’m not sure what the main distinguishes is between me clicking it and the computer clicking it.
have you tried comparing the before and after selectors of said element and then setting focus or simulating the click before you carry out further actions on your uielement? This normally worked for me when working with iFrames
Yes, the problem doesn’t seem to lay in the selectors as it works when I click on the list item manually. When I refresh the page and make the robot do it with the Click activity it gets stuck on the GetAttr activity. But if i go in and click on it myself, the GetAttribute picks it up and works.
I also don’t notice any difference between me clicking on it and the robot clicking on it, both after clicking on it makes the list item become highlighted so it’s not to say that the robot is not clicking on it correctly.
There are events that take place in the background of the page, so you will have to see which selectors are in play when you manually click on it.
Let us say that once you click on it get attribute works fine then until you click (the event) the webpage is waiting for the same to happen to make it available.
You can try a different combinations of hover, or set focus or activate element or simulation etc…
It is basically trial and error or you can inspect the element and see what JS functions are assigned to that particular uielement (if it is web based) and then act on it.
If issues still persist, so share me the page source and the selectors we can triage it.
Unfortuntely I’m unable to share the webpage as it requires credentials, but here is what I noticed.
The GetAttribute Activity works when I click on the list item and then click on the edit button:
Once I refresh the page, It becomes invalid, however, if I click on the list item again, the GetAttribute selector becomes valid. That’s why I added a Click activity prior to getting the GetAttribute.
Refresh page( unselected list items by default)
At this point, If i click on it manually the selectors will become valid.
If i use the Click activity to do it, the program will not find it and I will get an UiElement not found.