* @param select the select in which to search
* @param text The text representing a particular value
* @return The option element corresponding to the specified text
*/
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);