Help with a selector which is not working

I’m trying to set a selector and for some reason it doesn’t work.

For example this page:

At the bottom there is pagination row and I want to select page 6
(will replace with dynamic, but first I want to set the best selector for static).

I’m using latest IE. I open new browser, then attach the page.
So the automatic selector created by UiPath is:

This validates, but it’s a very shitty selector for at least 2 reasons:
It uses idx when it can be avoided, and for the aaname attribute it wrongly uses the class name!!
when aaname should be ‘6’.

I would like to have my selector like this:

which, although uniquely identifies the element, doesn’t work.
Or someting similar would be fine too, but you get the idea.

Any hints would be appreciated.

1 Like

Hi,

How about the following selector?

<webctrl tag='A' innertext='6' />

Regards,

1 Like

Hi,
You can also use the link to navigate to the relevnt page. At the end of the link you have “?page=5” if you add a new variable with the page number, you can go to page without using selectors. :slight_smile:

You can try with Navigate to activity and String.Format(“https://baseconnect.in/companies/category/e58f4a7c-2ef5-495d-bfc2-7107ffc2a3bb?page={0}”, strPageNumber)

That seems to be working, thanks!

P.S. I forgot to paste the hopeless automatic selector:

Just for my information, shouldn’t aaname work the same?
Is that automatic selector correct…?

For some reason the system deletes all selectors that I paste here.

Hi,

aaname is not always same as inner text. In this case, inner text is better than aaname.

For some reason the system deletes all selectors that I paste here.

We need to use preformatted text (Use </> icon in the above menu) or add 4 spaces at the beginning of the line, to display < character.

Regards,