How to check if web page contains certain text string and stop script if it does

Hello, can anyone show me example how to check if web page contains certain text string and stop script if it does?

The fastest way to search for text anywhere on the website is to look (search) the page source code. You can do this with sourceSearch:

  • sourceSearch | Tea $*</li> | var1
  • if | ${var1} > 0 | If text is not found, the value of var1 is 0. If it is found, it is 1 or larger.
  • ThrowError | Text found! Stop Script! <= this stops the script
  • end