public function getOptions()
{
$action = function ($element, $elementName, $elementDesc) {
$log = usingLog()->startAction("retrieve the options of them {$elementDesc} '{$elementName}'");
// get the elements
$optionElements = $element->getElements('xpath', "descendant::option");
// extract their values
$return = array();
foreach ($optionElements as $optionElement) {
$return[] = $optionElement->text();
}
// all done
$log->endAction(count($return) . ' option(s) found');
return $return;
};
return new SingleElementAction($action, 'getOptions', $this->getTopElement());
}