The best place to ask programming/development questions, imo. UPDATE: stackoverflow is 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 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