public function login() { $this->driver->get('https://web.skype.com'); $this->driver->wait()->until(function () { return WebDriverExpectedCondition::presenceOfElementLocated(WebDriverBy::id('username')); }); $this->driver->findElement(WebDriverBy::id('username'))->sendKeys($this->username); $this->driver->findElement(WebDriverBy::id('password'))->sendKeys($this->password); $this->driver->findElement(WebDriverBy::cssSelector('form'))->submit(); $this->waitForSelector('[name=query]'); sleep(15); return true; }
/** * @param mixed $url * @return $this * @throws WebDriverException */ public function get($url) { $this->dispatch('beforeNavigateTo', $url, $this); try { $this->driver->get($url); } catch (WebDriverException $exception) { $this->dispatchOnException($exception); } $this->dispatch('afterNavigateTo', $url, $this); return $this; }
/** * @param string $path */ public function get($path) { $url = $this->_baseUrl . $path; $this->_webDriver->get($url); }