public function has()
{
$action = function ($element, $elementName, $elementDesc) {
$log = usingLog()->startAction("check the current page for {$elementDesc} '{$elementName}'");
if (is_object($element)) {
$log->endAction('found it');
return true;
}
$log->endAction('could not find it');
return false;
};
return new SingleElementAction($action, "has", $this->getTopElement());
}