PennController for IBEX › Forums › Support › test.selected() for multiple options › Reply To: test.selected() for multiple options
September 24, 2020 at 9:36 am #6163
As you can see in the documentation the test.selected command only accepts single arguments, so yo cannot simply pass it a series of arguments in order to express a disjunctive test.
What you can do however is use the or and and commands (which I don’t think are documented at the moment). As you said, excluding the two invalid options is more economical, so let’s do that:
.wait( getDropDown("age") .testNot.selected("17 or younger") .and( getDropDown("age").testNot.selected("32 or older") )
If you want to add the requirement that they not speak another language, simply stack .and( getDropDown("language").selected("no") )
Let me know if you have questions