private HtmlOption getOptionForText(final HtmlSelect select, final String text) {
final IStringVerifier verifier = getVerifier(fIsRegex);
for (final Iterator iter = select.getOptions().iterator(); iter.hasNext();) {
final HtmlOption option = (HtmlOption) iter.next();
LOG.debug("Examining option: " + option);
if (verifier.verifyStrings(text, option.asText())) {
LOG.debug("Found option by text: " + option);
return option;
}
}
throw new StepFailedException("No option element found with text \"" + text + "\"", this);