How to search text on webpage and do something after

I am trying to set up a bot for some ad posting

Is there a way to search for a text on a webpage that gets updated constantly. And if the text is found I can do some type of IF function.

For example if the text is found I can post my ad on top and if its not found it will refresh until its found

HI @pdm ,

Sharing my thought on the requirement.

  1. Use application/browser activity to open your application

  2. Use Get text activity and capture entire screen so that you will get whole text in a string variable.

  3. Use below expression to in the if condition you are talking about to perform your action

if → Outputstring.contains(“Your Text”)

then → Do your automation

else → do some exception handling or business exception.


Hey @kirankumar.mahanthi1,

Gonna need your help again. If lets say the text isnt found how do I make the “else” part repeat the previous activity until its found then it moves through the “then” part


Try to use retry scope activity(use your code again and place it inside of retry scope) and you can assign how many times it should repeat. I hope it might helpful for your requirement. Thanks.

Hi @kirankumar.mahanthi1

I am confused on what to do

I did Retry Scope - IF - if word is found then go to url and post. But what do i do in the else section to make it search again till its found?

Why can’t you use a while loop with the same condition of finding your text ? You can also put a delay activity to keep trying after every few minutes.

Hi @pdm

  1. Use Flowchart workflow

  2. Use Get Text activity. Store the value in the variable Ex: GetText

  3. Use Flow decision. Condition → GetText.contain(“Your text”)

True → Do your automation
False → Go to Get text Activity

Refer the screenshot

Hope it will help you


Im open to any ideas. Im a complete newb so i probably dont even know all the basics.

Ill try both ideas.

Basically what I’m trying to do is

Go to site - search text - if found go to another url - if not repeat search text

Then from go to url - i may have to possibly login - if asked to login - login - continue to next page where i click and submit

if not then continue with click and submit


We can adopt some of the logic from @Gokul001 . typically this is to maintain retry logic by using flow charts. But we must and should use counter to control the loop otherwise it might lead to infinite loops. please refer the below screenshot. and also attaching the sample work flow for your reference. check and let us know is this what you are expecting. thanks. (5.7 KB)

got it working thank you!

as a side question is there anything in uipath that can do

Gettext.cointains(“a”) or Gettext.cointains(“b”) or Gettext.cointains(“c”)


if found “a” - runs activity, if found “b” - runs activity, if found “c” - runs activity

then it repeats search again after each ran activity but without searching something that has been found?

i dont know if that makes sense

in this case go for switch instead of if else condition it will do the trick. thanks.