function __construct($parent, $element, $options) { if (get_class($parent) == 'WebDriver') { $root = $parent->requestURL; } else { $root = preg_replace("(/element/.*)", "", $parent->requestURL); } parent::__construct($root . "/element/" . $element->ELEMENT); }
function __construct($host, $port) { parent::__construct("http://" . $host . ":" . $port . "/wd/hub"); }