コード例 #1
0
ファイル: Helper.php プロジェクト: roccivic/phpmyadmin
 /**
  * Get table cell data
  *
  * @param string $identifier Identifier: tableId.row.column
  *
  * @return text Data from the particular table cell
  */
 public function getTable($identifier)
 {
     list($tableID, $row, $column) = explode(".", $identifier);
     $sel = "table#{$tableID} tbody tr:nth-child({$row}) td:nth-child({$column})";
     $element = $this->_selenium->byCssSelector(
         $sel
     );
     return $element->text();
 }
コード例 #2
0
ファイル: SeleniumTestCase.php プロジェクト: fbone/mediboard4
 /**
  * Get an element by css selector and wait until timeout if element is not present
  *
  * @param string $value       The css selector
  * @param int    $waitTimeout timeout value
  *
  * @return PHPUnit_Extensions_Selenium2TestCase_Element
  */
 public function byCssSelectorAndWait($value, $waitTimeout = 10000)
 {
     parent::waitUntil(function () use($value) {
         if ($this->byCssSelector($value)) {
             return true;
         }
         return null;
     }, $waitTimeout);
     return parent::byCssSelector($value);
 }
コード例 #3
0
 /**
  * Returns an element locator through its field name by map
  *
  * @param string $field The field name.
  * @return PHPUnit_Extensions_Selenium2TestCase_Element The element.
  */
 protected function _byMap($field)
 {
     return $this->test->byCssSelector($this->_getLocator($field));
 }