library/QATools/QATools/HtmlElements/Element/Select.php
public function getOptionsByText($text, $exact_match = true)
	{
		$escaper = $this->getXpathEscaper();

		if ( $exact_match ) {
			$xpath = 'descendant-or-self::option[normalize-space(.) = ' . $escaper->escapeLiteral($text) . ']';
		}
		else {
			$xpath = 'descendant-or-self::option[contains(., ' . $escaper->escapeLiteral($text) . ')]';
		}

		return $this->wrapOptions($this->getWrappedElement()->findAll('xpath', $xpath));
	}
public function getOptionsByText($text, $exact_match = true)
	{
		$escaper = $this->getXpathEscaper();

		if ( $exact_match ) {
			$xpath = 'descendant-or-self::option[normalize-space(.) = ' . $escaper->escapeLiteral($text) . ']';
		}
		else {
			$xpath = 'descendant-or-self::option[contains(., ' . $escaper->escapeLiteral($text) . ')]';
		}

		return $this->wrapOptions($this->getWrappedElement()->findAll('xpath', $xpath));
	}
public function getOptionsByText ( $ text , $ exact_match = true ) { $ escaper = $ this -> getXpathEscaper ( ) ; if ( $ exact_match ) { $ xpath = 'descendant-or-self::option[normalize-space(.) = ' . $ escaper -> escapeLiteral ( $ text ) . ']' ; } else { $ xpath = 'descendant-or-self::option[contains(., ' . $ escaper -> escapeLiteral ( $ text ) . ')]' ; } return $ this -> wrapOptions ( $ this -> getWrappedElement ( ) -> findAll ( 'xpath' , $ xpath ) ) ; }
Returns all options that display text matching the argument.

@param string  $text        Text of the option to be selected.
@param boolean $exact_match Search for exact text.

@return SelectOption[]
Returns all options that display text matching the argument .