I have a dynamic menu list, and I would like to get a list element text, but I don’t know how can I chose one of the elements and get its text. If I click on one element, the menu navigate to its page. But I don’t want this, just get the text of the menu list element and save it into a variable.
Ok, I’ve fount how can it work.
Next question, can I cut somehow these texts into 2-3 parts, like in excel the “left” and “right” functions?
since under hood of Katalon is beating groovy heart you can use any of it:
Equivalent to Excel left:
def str = "CANDY"println str.take(2) // CA
Equivalent to Excel right:
def str = "CANDY"println str.reverse().take(2).reverse() // DY
For more examples of Groovy Substring operations, see