david001's avatar

Dusk, how to make sure it is there

I have a dropdown as below


<select name="anytime">
    <option value="">Please choose </option>
    <option value="30">30</option>
    <option value="50">50</option>
</select>

How to make sure "Please choose is there"

I have used assertValue,assertSelected but didn't work

0 likes
1 reply
bugsysha's avatar

You can use one of the following:

  • assertSelected($field, $value)
  • assertNotSelected($field, $value)
  • assertSelectHasOptions($field, $values)
  • assertSelectMissingOptions($field, $values)
  • assertSelectHasOption($field, $value)
  • assertAttribute($selector, $attribute, $value)

There are more options depending on how you want to go about it.

Please or to participate in this conversation.