The best place to *find* answers to programming/development questions, imo, however it's the *worst* place to *ask* questions (if your first question/comment doesn't get any up-rating/response, then u can't ask anymore questions--ridiculously unrealistic), but again, a great reference for *finding* answers.

My Music (Nickleus)

20131010

sahi - how to assert whether an html select option is selected or not

_option("FullReceived").selected

the above code is just a partial. here are some examples of implementations:

assuming that it IS selected, i.e. expecting a "true" value to be returned:
_assert(_option("FullReceived").selected);

and if/else test:
if(_option("FullReceived").selected) {
  ...
} else {
  ...
}


No comments:

Post a Comment