How to select Random item or randomly click on a item

Hi, can anyone let me know how to select randomly name from the list? suppose I have a web page where a list of the name is mentioned in sequence. But I have to select one randomly. Can you please tell me the best method. How can I achieve this?

1 Like

Hi,
Randomly means how you want to click randomly on any of them?

Try to get the selector and check for similarity and then you can pass the selector into click activity and this should help you.

Regards,
Pavan H

2 Likes

Yes on any item randomly bro. But not get what you said can you please explain me more.

1 Like

Hi,

attach the screenshot of where you want to click randomly,

Regards,
Pavan H

1 Like

Hello @balkishan,

Just generally speaking, if you want to select a random name from a list, you’re likely going to get the total number of elements that you have to choose from (with something like find children) if it’s a table or string manipulation if it’s not, use rnd to get a random number (you will likely need to create a function that will give back integers within the range that you’re expecting), and then use that to select from the list.

The actual steps, as you can tell, are going to be situationally dependent. As @pavanh003 mentioned we would need more information to help you further if you have an actual situation where you’re trying to accomplish this.