/** * Uri of currently opened page. * @return string * @api * @throws ModuleException */ public function _getCurrentUri() { $url = $this->webDriver->getCurrentURL(); if ($url == 'about:blank') { throw new ModuleException($this, "Current url is blank, no page was opened"); } return Uri::retrieveUri($url); }
/** * @return Uri */ public function getCurrentUri() { return Uri::fromString($this->webDriver->getCurrentURL()); }