Select a value that CONTAINS or STARTSWITH

Hi Forum - new Kantu user and thrilled that I was able to create a simple macro right away to dimiss tasks in a CRM that really do not need a human to review.

For my next macro I am selecting a choice “Lead process completed (35)” from a drop down box, however the choice has a count of records at the end, so the choice value changes after each use and I can’t loop the macro since it needs to look for “Lead process completed (34)”, or better yet, just “Lead process completed*” using a wildcard.

Example: https://snag.gy/PjE3qF.jpg

I do not have any programming training. I Googled and did not find examples of modifying the table entry or the JSON code to select a value that CONTAINS or STARTSWITH, etc.

Can someone please give me guidance?

Thanks!

Chris

Hi, you can use the asterix symbol * to create the “startswith” effect. So label=Lead process completed* should work.

Here is a small test macro:

{
  "Name": "contains demo",
  "CreationDate": "2019-1-11",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://a9t9.com/contact",
      "Value": ""
    },
    {
      "Command": "select",
      "Target": "id=WhatSoftware",
      "Value": "label=*Free*"
    }
  ]
}

Hi Timo - thanks for the quick reply!

I entered your code suggestion into Kantu like this… https://snag.gy/OaACyb.jpg …however the browser ended up getting the entire value in the dropdown selection element in this manner… https://snag.gy/o4uXfz.jpg

Any suggestions?

ah, the questions is is not the select box, but the menu…

=> I recommend you switch to use visual automation with xclick, this saves you from the trouble of having to find the right locator - which can be very tricky on such a complex page, even for experts.

The visual command will look like this:

XClick | l1