Skip first child using Find Children activity

studio

#1

Hi all!

I’m using Find Children activity to get all the

elementes inside a Table. The problem is that I want to skip the first one. I mean, I have something like this:
<table>
**<TR>Level I want to Skip</TR>**
<TR>level 2 ok</tr>
<TR>level 3 ok</tr>
<TR>level 4 ok</tr>
<TR>level 5 ok</tr>
</table>

How can I do this?

Regards


#2

from find children activity you will get an element Array.
consider that the array variable is elements you can skip 1st item by using elements.Skip(1)


#3

Thanks, it works!


#4

I have a question. It’s possible to incremente the skip element? I mean this:

For each Child in Children.element(Counter)
Actions...
Assign:
Counter = Counter +8

With this i want to indicate to look in the child Counter+8. I’m doing this but my skip action doesn’t take the value of the assign activity.

Regards


#5

you increment the counter in for each activity. for each is differ from for loop. you can try this with while or do… while loop


#6

Do you have any example using these functions in UiPath? I’ll apreciate them.

Thanks


#7


#8

image


#9

Hi, sorry for so many questions but i can’t understand this. I just tried it on my UiPath project but it doesn’t work. I have a For Each Child activity that get the cell that I want from the table. what i want is to increment the counter and that in the For Each activity it gets update. I attached an image of my activity.

Problem

And this is inside Element Scope after do everything I want.

Problem2

The counter in the For Each doesn’t update but it updates in my Element Scope

Thanks in advance


#10

in for each activity counter won’t work… this is a simple example

the output is
1 2 3 4 5 6 7 8 9

so, i have to use some other loop, like while or do..While. check this example

test.xaml (8.7 KB)


#11

Thanks for your response! I just tried what you’re doing but some errors are showing up.
I attached images for better explanation
"Child" type in For Each activity:
Child
ChildTest and Counter Type:

When I tried to do the same that i’m doing with for each but with Do While activity i get this error:
Errorsaving

So what i tried was converting it into string and pasting it as selector like the following:
ClickActivity

Everything was fine but when I test it, the following error appear:

How can i solve this?
I really appreciate your help, i don’t know what else to do.
Thanks in advance!


#12

Child. Selector. ToString

Make sure that child variable data type is uipath.Core.uielement


#13

I’ve just did that but now i get the error: The selector is not valid


#14

can you share the workflow?