コード例 #1
0
ファイル: Client.php プロジェクト: exfriend/skypium
 public function getContactStatus($username)
 {
     $search = $this->driver->findElement(WebDriverBy::cssSelector('[name=query]'));
     $search->clear();
     sleep(1);
     $search->sendKeys($username);
     usleep(500);
     $ppl = $this->driver->findElement(WebDriverBy::cssSelector('ul.people swx-avatar-deprecated:nth-child(1) > span:nth-child(1)'));
     $class = $ppl->getAttribute('class');
     $status = str_replace('tile ', '', $class);
     return $status;
 }
コード例 #2
0
 /**
  * @param WebDriverBy $by
  * @return EventFiringWebElement
  * @throws WebDriverException
  */
 public function findElement(WebDriverBy $by)
 {
     $this->dispatch('beforeFindBy', $by, null, $this);
     try {
         $element = $this->newElement($this->driver->findElement($by));
     } catch (WebDriverException $exception) {
         $this->dispatchOnException($exception);
     }
     $this->dispatch('afterFindBy', $by, null, $this);
     return $element;
 }
コード例 #3
0
ファイル: Navigator.php プロジェクト: cargomedia/webnavigator
 /**
  * @param string $locator
  * @return WebDriverElement
  */
 protected function _findElement($locator)
 {
     return $this->_webDriver->findElement($this->_getLocator($locator));
 }