9 use Magento\Mtf\Block\Block;
10 use Magento\Mtf\Client\Locator;
29 private $direction =
'[data-role="direction-switcher"]';
38 $selectedOption = $this->_rootElement->find($this->sorter)->getElements(
'option[selected]')[0]->getText();
39 preg_match(
'/\w+\s?\w+/', $selectedOption, $matches);
50 $content = $this->_rootElement->find($this->sorter)->getText();
62 if (!empty($sortBy[
'field'])) {
63 $this->_rootElement->find($this->sorter, Locator::SELECTOR_CSS,
'select')->setValue($sortBy[
'field']);
66 if (!empty($sortBy[
'direction'])) {
67 $switcher = $this->_rootElement->find($this->direction);
68 if ($switcher->getAttribute(
'data-value') == $sortBy[
'direction']) {