I am currently building a robot around LinkedIn but they changed their userface a little bit the last few days.
My before situation:
I looked a certain person up, cheched if it says: 1 result
If so, I proceeded. If it said 2 results or more, I dropped the row I was working with in an exception box.
So it doesnt give away the amount of search results anymore and I am totally blank on how to solve this problem. I still need to check if there is one result before I proceed the execution.
My idea: Somehow I need to count the amount of results. If it is < 2, I will proceed. Would this be the best way?
Hi @ESCH, welcome to the UiPath community!! Can you try looking at the selectors of each of those names and checking if they have anything that refers to their row/index number? Maybe a tag? It will change based on the results. I had a similar problem and I just checked for the row numbers, which were present in each selector. If there are, say, a maximum of five rows, you could make the selector dynamic and use element exists within a loop with that particular selector. Hope this helps!
Hi @ESCH, in the screenshot you shared, there’s a tag called “idx”. That’s going to change based on the result. It will be “1” for the first result, “2” for the second, and so on. You could replace it with a variable to make it dynamic, and then use a loop.
EDIT: It doesn’t have to start with “1”. But it will change based on the result.
I made this example on the different ways you can place the selecton on one of the results. When I choose to make the biggest selection for example, all search results have idx = 2. When I select a smaller piece of the result (only the name for example) idx = 1 on all of the search results.
Hi, so as you can see, in the page that I opened, it does show the number of search results! I wonder why it’s not visible in the screenshot you posted. I also tried selecting different results, and I can’t find a value that gets incremented in the selector.
I know, this was what it looked like four days ago here as well. LinkedIn is rolling out their new interface and I don’t see these number of results anymore.