public function frame($identifier)
{
$idParam = null;
$type = gettype($identifier);
if ($type == 'string' || $type == 'integer') {
$idParam = $identifier;
} elseif ($type == 'object' && $identifier instanceof WebElement) {
$idParam = array('ELEMENT' => $identifier->getElementId());
}
$params = array('id' => $idParam);
$command = new Commands\Command($this->_driver, 'frame', $params);
$command->execute();
return $this->_driver;
}