Hi Jeremy,
I am trying to check if user input contains at least one of two possible words (from a csv), and I am having trouble coming up with the correct syntax for the RegExp. I’ve tried so many different ways of writing it, but I can’t get it. Here’s what I have that is the closest to it… but it only works if the first word (option1) is found, the second one (option2) is ignored completely.
Any help would be appreciated!
getButton("cont")
.wait(
getTextInput("desc")
.testNot.text("").failure(getText("warning").print())
.and(
getTextInput("desc").test.text(new RegExp(variable.Option1) || new RegExp(variable.Option2))
.failure( getText("warning").print() )
)
)
,
Thanks so much,
Sam