Search for Text in a webpage and then stop then play sound?

Search text:

If text is in page source: => Use SourceSearch command. See also How to sourceSearch and sourceExtract with case-insensitve text - #4 by admin

If text is not directly in page source (e.g. due to frames, Javascript, Ajax and other modern page elements):

  • automate the browser text search by simulating “Ctrl+F” with XType and RPA desktop automation

  • Or: Use OCRSearch. If this is a large web page and you want to also OCR the text below the fold then add visionLimitSearchArea | full before the OCR search command.

Demo macro for the OCR method:

{
  "Name": "page text search",
  "CreationDate": "2021-6-21",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://ui.vision",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "visionLimitSearchArea",
      "Target": "full",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "2",
      "Value": "!ocrengine",
      "Description": ""
    },
    {
      "Command": "OCRSearch",
      "Target": "data-driven",
      "Value": "a",
      "Description": ""
    },
    {
      "Command": "if_v2",
      "Target": "${a} >= 0",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "found ${a}  times",
      "Value": "green",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    }
  ]
}