/** * Get element data. * * @param ElementInterface $element * @return string */ protected function getData(ElementInterface $element) { $selectedElement = $this->find($this->advancedSelect); $selectedElement->click(); $text = trim($element->getText()); $selectedElement->click(); return $text; }
/** * Get element label. * * @param ElementInterface $element * @return string */ protected function getElementLabel(ElementInterface $element) { return trim($element->getText()); }
/** * Get element label. * * @param ElementInterface $element * @return string */ protected function getElementLabel(ElementInterface $element) { $value = $element->getText(); preg_match('`(.+) \\(.*`', $value, $matches); return $matches[1]; }
/** * Get element label. * * @param ElementInterface $element * @return string */ protected function getElementLabel(ElementInterface $element) { $value = $element->getText(); preg_match($this->regPatternLabel, $value, $matches); return trim($matches[1]); }
/** * Get element data. * * @param ElementInterface $element * @return string */ protected function getData(ElementInterface $element) { $this->find($this->advancedSelect)->click(); return trim($element->getText()); }
/** * Get review's title. * * @param ElementInterface $titleElement * @return string */ protected function getReviewTitle(ElementInterface $titleElement) { return strtolower($titleElement->getText()); }
/** * Get column value. * * @param ElementInterface $element * @param array $attributes * @return string */ protected function getColumnValue(ElementInterface $element, array $attributes = []) { $search = isset($attributes['replace']) ? $attributes['replace'] : ['$', '%']; return trim(str_replace($search, '', $element->getText())); }