public function selectByValue($value)
{
$options = $this->_element->findElements(By::xPath(".//option[@value = '" . $value . "']"));
$matched = false;
foreach ($options as $option) {
if (!$option->isSelected()) {
$option->click();
}
$matched = true;
}
if (!$matched) {
throw new \Exception("Cannot locate option in select element with value: " . $value);
}
}