Selector and For Each Row

Hello everyone!

I have an issue with a selector in Success Factors, where I need it to click an extra menu which has a download button, but for every row. I can’t manage it to make it work to do that. Instead, for every item in the table it performs the click on the extra menu only for the first row. In the picture posted the only thing that changes every time that page is accessed is the number after “clone”. And that’s the first row. Every row after the 1st it increments it by 1. So in the screen shot the first row is “88”, the 2nd is “89” and so on. And when I refresh the page the number after “clone” it has changed. Could be “20” or whatever for the 1st row, then incremented by 1 for every row after. Any ideas?

sf

Thanks! Much appreciated!

Hi, welcome to the community!
If you fell this id is good enough of a selector, than you need to extract that number for the first row into a numeric variable and in a loop you use that for making a dynamic selector appending to the text that is static.

Thank you for your answer!

I know what you say, in theory I thought about that too by using the dynamic variables, but I have no idea how to do it in practice, haha.
That id is the only thing that can be related to the action of expanding of the hamburger menu. That means I can only work with that id, and nothing else. Can you give me an example of how to extract that number from the id? I’m fairly new to UiPath, I’m still learning and this real world issue is way over my head at this moment.

Use a Get Attribute with a selector like the one you showed above but replace the number inside the id with a * and in attribute name put “id”, that will go to a text variable (myID) with the example value of “__icon7-__clone88”.

Create a new Number variable as varNumer and assign its value to: Cint(myID.Replace("__icon7-__clone",""))

Thanks for your input, that worked but there’s another issue. I’ll attach an image and the sequence, and I think I should explain the process of what I’m trying to do: for every “title name” in the row → click the action button → click the download button → enter the designated “path” and the specific “title name” in the “Save As” window → click “save” → repeat for the next row.

If I try the “for every row in data table” activity it clicks just the first action button of the first row every time, but it enters the “title name” for every other row that it reads. The result is the same file with a different name.

Meanwhile, if I put it in a loop activity, it clicks on every action button correctly but it saves the files with only the same “title name” in the first row.

So I need to do something like a combination of both, if that’s a thing. It should click the action button then download and enter the “title name” only for that specific row.

What would be the best approach to do this?

my_xaml.xaml (19.9 KB)

well you will need to add 1 to that id at the end of each loop…

Still can’t make it work, and I’ve run out of ideas. @Palaniyappan Hey buddy, can you give your point of view on this?

See this discussion so you better understand what you need to do…

Hi, I managed to find a workaround using Do While with a condition of a specified number of files that have to be downloaded automatically in a specified directory. That works for now.

Now, I’m stuck with renaming said files in the directory. Basically I need to remove the date/time stamp from the end of the each file, the final name should have only the letters and extension.

rename

you can use:
varFileName=varFileName.Remove(varFileName.IndexOf("_"c), 19)

It gives me this error “Assign: Object reference not set to an instance of an object.”. I’ve tried other ways too, that fellows devs here suggested in other topics but I can’t make it work.

your filename variable cant be empty… initialize it before using…

Finally I made it work. Thanks for everything, man!

1 Like

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