/**
  * Returns an array of field values from an edit screen.
  *
  * @param string  $itemName    Name of item (user name, article title, and so on)
  * @param array   $fieldNames  Array of field labels to get values of.
  */
 public function getFieldValues($className, $itemName, $fieldNames)
 {
     $this->clickItem($itemName);
     $this->editItem = $this->test->getPageObject($className);
     $result = array();
     if (is_array($fieldNames)) {
         foreach ($fieldNames as $name) {
             $result[] = $this->editItem->getFieldValue($name);
         }
     }
     $this->editItem->saveAndClose();
     return $result;
 }
 /**
  * Checks for Type and calls special method for this field.
  * Otherwise, just calls parent::getFieldValue()
  *
  * @see AdminEditPage::getFieldValue()
  */
 public function getFieldValue($label)
 {
     if ($label == 'Type') {
         return $this->getModuleType();
     } else {
         return parent::getFieldValue($label);
     }
 }
 public function getFieldValue($label)
 {
     $result = false;
     if ($label == 'ID') {
         $result = $this->driver->findElement(By::id('jform_user_id'))->getAttribute('value');
     } else {
         $result = parent::getFieldValue($label);
     }
     return $result;
 }
Exemple #4
0
 /**
  * function to get field value
  *
  * @param   string  $label   stores label
  *
  * @return bool|String
  */
 public function getFieldValue($label)
 {
     $result = false;
     if (strtolower($label) === 'menu item type') {
         $result = $this->getMenuItemType($label);
     } elseif (in_array(strtolower($label), array('article', 'contact', 'newsfeed', 'weblink'))) {
         $result = $this->getRequestVariable($label);
     } elseif (strtolower($label) == 'category') {
         $result = parent::getSelectValues(array('tab' => 'Details', 'id' => 'jform_request_id'));
     } else {
         $result = parent::getFieldValue($label);
     }
     return $result;
 }