Reply To: test.selected() for multiple options

PennController for IBEX Forums Support test.selected() for multiple options Reply To: test.selected() for multiple options

#6163
Jeremy
Keymaster

Hi,

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

Jeremy