Dynamic aname in selector

HI,

I am trying to capture aname in selector dynamically
as the values of aname ranges from 1…n
But when i try to give aaname=‘*’ , it dosen’t work

Selector:

and if aname has to be taken in variable then how can i do that

Please help me with some ideas.

Regards,
Heena

It sounds like you’re trying to run the activity multiple times for values of aaname from 1…n. To do this, put your activity in a While loop with an index starting at 1. Pass that index into the activity as a parameter. If you know what n is, have the loop run n times. If not, you can use Element Exists to determine if you should stop iteration.

did we check with this thread buddy

@heena_shaikh

@Palaniyappan. . thank you for response

but how can i pass dynamic aname in variable?

regards,
Heena

If you right-click in the Modify Selector window in UiPath Studio 2019, you’ll see a window asking what variables or arguments you want to pass to the selector. Choose your variable from this window.

image

if that value increments and we also try to access them one after the another then use a FOR EACH or WHILE activity and inside that use this activity with selector having variable
named counter
and atlast inside the FOR EACH or WHILE use a assign activity mention like this
counter = counter + 1

so that we will be able to access the aaname element one by one

Cheers @heena_shaikh

@Palaniyappan
Values are as shown below and they generate everytime i upload document.

and i have to click the most recent number(Ie: numbers are basically link to navigate to another page)

image

so will you start from 60 and click one by one like 59,58,…
@heena_shaikh

Use UiExplorer to inspect the first element. There is likely an idx value you can use. The first element will either be idx 1 or 2, depending on how the data is structured.

If there is not an idx value, see if there is a row and column value, and use those. That will get you the element at the top of your data. You will not need to iterate if you only need the top-most item.

no only the top most ie :60

1 Like

so will that come under the column Submission ID
@heena_shaikh

@Palaniyappan yes

Then did we try with anchor base
like use ANCHOR BASE activity and use FIND ELEMENT or FIND IMAGE activity where choose that Submission ID text as element or image
and in the right side of anchor base we can use normal CLICK activity where we can now mention aaname as * but ensure that id attribute is included and not changed

cheers @heena_shaikh

1 Like

@Palaniyappan. .

As always your solution worked. . .Thank you :grinning:

Regards,
Heena

Cheers @heena_shaikh

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