How to click on a Ui Element only if it contain a specific text ( out of many similar Ui element )

im really sorry these questions may sounds abit Dumb , but im so new , and im still learning .

  1. Lets say for example i have a UI of a list of elements ( lets say search results or for example a list of followers on a Instagram ) , how to make the BOT click on one of all of those similar UI elements in condition of containing a specific text ,
    lets say i have a list of followers , and i want to click on the one containing my name Celie , how to do that ?

2 ) and is there any tutorial concerning scraping ? i want to know how to scrap all of this similar UI elements one by one until we arrive to the last one ,

any tutorial or video to do what i mentionned above is welcome ,

thanks in advance !


Hi @celie.mccook

  1. Use click activity and indicate it on your name and analyze the selector if any element is unique for that particular name like aaname or text and you can pass variable dynamically in the selector to click on your name or any other name you wish to click

  2. You can see Data Extract example in UiPath site


1 Like

1- i want to Enter that Name as a variable that will change in the script ! can i ? and how ?


Please use for each ui element activity and indicate your similar elements…Inside the loop use Get Text activity or Gett attribute with currentitem and check the text if it matches with your input text using a if condition str.Contains(“Name you require”) …Here str is the output of get text or Get Attribute…

In the then side of if use the clcik activity


Use UI Explorer and find a selector which includes name in the attributes and use a variable in place of name and when the name changes accordingly it clicks on the corresponding selector


1 Like