Skip to content
Snippets Groups Projects
Commit 694c8c34 authored by Michael Logvin's avatar Michael Logvin
Browse files

Merge branch 'MAGETWO-34378' of...

Merge branch 'MAGETWO-34378' of github.corp.ebay.com:magento-firedrakes/magento2ce into MAGETWO-34378
parents 5fa41e84 0e3ed7b4
Branches
......@@ -66,7 +66,7 @@ class Grid extends DataGrid
*
* @var string
*/
protected $previewCmsPage = ".//a[contains(@class, 'action-menu-item') and text() = '%s']";
protected $previewCmsPage = "..//a[contains(@class, 'action-menu-item') and text() = '%s']";
/**
* Search item and open it on Frontend.
......@@ -81,8 +81,10 @@ class Grid extends DataGrid
$this->search($filter);
$rowItem = $this->_rootElement->find($this->rowItem);
if ($rowItem->isVisible()) {
$rowItem->find('.action-select')->click();
$rowItem->find(sprintf($this->previewCmsPage, $itemName), Locator::SELECTOR_XPATH)->click();
$selector = sprintf('//tr[td="%s"]//*[@class="action-select"]', $filter['title']);
$selectedRow = $this->_rootElement->find($selector, Locator::SELECTOR_XPATH);
$selectedRow->click();
$selectedRow->find(sprintf($this->previewCmsPage, $itemName), Locator::SELECTOR_XPATH)->click();
} else {
throw new \Exception('Searched item was not found.');
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment