Clicking on sourceSearch results

Hi,

I am just a beginner here and I am still learning the basics and I have a simple question.

I have a page that I want to search in it for $ and any number next to it.
For example, $100, $50, any number specifically next to the $.

I was able to create the following code and it works perfectly fine. It can find the amount of money I want on the page.

The next thing I wanted to do is that I wanted a command to click on the results that was found specifically in the sourceSearch. Is there any way to do that?

I don’t want xpath, I have faced an issue with that before on the website, I just want the command to click on the specific results that were found in sourceSearch, usually it will be only one.
For example, in the code below, it will search for any number above $70. If it finds such results, I want it to click on it.

},
{
  "Command": "sourceSearch",
  "Target": "regex=[$]+([1-9]\\d{2,}|[7-9]\\d)",
  "Value": "matches",
  "Description": ""
},
{
  "Command": "if_v2",
  "Target": "${matches} == 0",
  "Value": "",
  "Description": ""
},
{
  "Command": "throwError",
  "Target": "error",
  "Value": "",
  "Description": ""
},
{
  "Command": "end",
  "Target": "",
  "Value": "",
  "Description": ""
},

THe rpa software can not click on source search results, because it does not know where the element would be. It can only click on elements found via xpath or css locator DOM search.

The alternative would be to use XClick with OCR search. This is slower, but it works nicely and the rpa software can click it!

1 Like