Get Attribute 'DIV' error

try to make a sequence when i inpus something and let the robot search it on particular site.
but when I try to use a get attribute ‘DIV’ below error comes out. how do i can solve it??

Get Attribute ‘DIV’: Cannot find the UI element corresponding to this selector:

Main.xaml (17.6 KB)

Hi,

Probably, your dynamic selector of Get Attribute Activity for aaname is not correct.
Please check dynamic selector string before the activity using Write Line activity etc

And Get Attribute activity can obtain attribute value of not UiPath Selector but HTML Element. So, you cannot get selctor value of parentid and aaname using the activity.
You might need to change your approach for it

Regards,

thank you for the advice

I wrote it in the selector

‘html title=‘Search results for '* category:109' - UiPath Community F*’ /><webctrl css-selector=‘body>section>div>div>section>div>div>div>div’ parentid=’“+parentid+”’ idx=‘“+index.ToString+”’ tag=‘DIV’ aaname=‘*’ /’

I think there is something wrong with parentid=‘“+parentid+”’ idx=‘“+index.ToString+”’ this parts
how do i can fix it… by chance…?

Hi,

Perhaps, first you should check content of “parentid” and “index” if they are what you expect.

Regards,

those attributes are case sensitive and even spaces count so be sure to check out the attributes in the selector before replacing it with your variable

Hi @111209 ,

Try as below by right click on the selector. I noticed this works all the time.

DynamicSelector

thank you! i solve it!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.