コード例 #1
0
ファイル: Client.php プロジェクト: exfriend/skypium
 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;
 }
コード例 #2
0
 /**
  * @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;
 }
コード例 #3
0
ファイル: Navigator.php プロジェクト: cargomedia/webnavigator
 /**
  * @param string $path
  */
 public function get($path)
 {
     $url = $this->_baseUrl . $path;
     $this->_webDriver->get($url);
 }