Select next row/item through web

I used Getfulltext to indicate result, however for the next loop, i would like it to pass through the next search result. On do while loop, I have defined variable rowNo as how many entries on page. Here is a picture of selector. uipath

1 Like

Fine
may i know what was the issue you were facing in this
Cheers @fmillo

I want the robot to read the next entry for every loop until the condition is fulfilled, i.e: “…CaseResults$|1” into 2,3,4 etc.
@Palaniyappan

I have already assigned a variable as “rowNo”
@Palaniyappan

Just increment the row number as the last step in the loop with an assign activity. Assign rowNo = rowNo + 1

May I ask why you are using a Do While loop instead of a For Each loop?

Fine
then in the selector mention like this for that attribute value
parentid = ‘…CaseResults$|’ " + counter.ToString + " ’ '

where counter is a variable of type int32 with default value as 1

so the workflow structure will be like this
–do while
–this get text activity with this selector
–use a assign activity like this
counter = counter + 1
–then do while condition expression be like this
rowNo <= counter

where rowNo is a variable assigned with a value limit as you said and make sure that the selector with this variable is passed as a string to the selector property within double quotes
i.e., dont add this variable while being inside the selector editor (selector editor windor) as it wont take that variable and its value…whenever we are passing a variable to a selector we need to mention that variable like above and pass the whole selector as a string between double quotes to the selector property in the property panel

hope this would help you
kindly try this and let know for any queries or clarification
Cheers @fmillo

What I’m trying to do is save each entry name as a folder on my computer. I can get it to save a folder for the first entry. I now need it to save the rest of the entries in their own folders. I don’t need to use counter because I already defined rowNo as my variable defining each entry. So instead of “CaseResults$|1” i need to replace the 1 with a changing variable so I can loop through and get the next entry @Palaniyappan

my condition needs to be that once i have 10 entries (rowNo<11) the loop can stop

I need to identify in the selector that each entry is changing as rowNo @Dave

@fmillo Replace the "CaseResults$|1" portion with "CaseResults$|" + rowNo.ToString + "rest of selector here"

It doesn’t validate and it also stops the RPA when it reaches get text function

Can you copy + paste everything within the ‘edit selector’ window and paste it here? I will then alter it so it will work. I am too lazy to type everything based on your image :slight_smile:

< webctrl id=‘PegaGadget1Ifr’ tag=‘IFRAME’ / >
< webctrl parentid=’$PSummaryPage$pSearchNCDCaseResults$l" + rowNo.ToString + "’ tag=‘A’ / >

Copy + paste this in the portion with the blue highlights. DON’T click the … to have the pop-up window come up, just paste it into the property window directly. It won’t validate right now, but it will work just fine at runtime

"< webctrl id=‘PegaGadget1Ifr’ tag=‘IFRAME’ / >< webctrl parentid=’$PSummaryPage$pSearchNCDCaseResults$l" + rowNo.ToString + "’ tag=‘A’ / >"

image

uipath3

this is what i’m working with

Click the + button by ‘Target’ then it will drop down the 5 properties i have shown in my screenshot

It didn’t work. It seems so simple maybe syntax? I really appreciate your help this is v important

**okay i think i fixed it and it works. do you know how to keep the loop going until say 10 entries are made? Like what should the condition say?

Put in a write line or log activity immediately before the failure point. Put in the same thing that you’re including in the selector. We want to make sure it is looking exactly the way you’d expect. If it is looking as expected, then copy + paste it from the output panel into UiExplorer and validate the selector. If it is not working, then you have an invalid selector (meaning it isn’t the syntax, it is the selector itself)

1 Like

If it’s a do while or while loop, the condition should be: rowNo < 11

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