Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ShoppingCartItems.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Client\Locator;
10 use Magento\Mtf\Fixture\InjectableFixture;
12 
17 {
23  protected $itemName = '//td[@class="col-product"]//span[contains(@class,"title") and normalize-space(text())="%s"]';
24 
31  public function getItemName(InjectableFixture $product)
32  {
33  return $this->_rootElement
34  ->find(sprintf($this->itemName, $product->getName()), Locator::SELECTOR_XPATH)->getText();
35  }
36 }