9 use Magento\Mtf\Block\Block;
10 use Magento\Mtf\Client\Locator;
11 use Magento\Mtf\Block\BlockFactory;
12 use Magento\Mtf\Client\BrowserInterface;
13 use Magento\Mtf\Client\Element\SimpleElement;
76 protected $tax =
'.totals-tax .price';
163 public function __construct(SimpleElement
$element, BlockFactory $blockFactory, BrowserInterface $browser)
165 parent::__construct(
$element, $blockFactory, $browser);
175 $grandTotal = $this->_rootElement->find($this->grandTotal)->getText();
187 $productItem = $this->_rootElement->find(
188 sprintf($this->productItemByName, $productName),
189 Locator::SELECTOR_XPATH
191 $price = $productItem->find($this->itemExclTax);
203 $productItem = $this->_rootElement->find(
204 sprintf($this->productItemByName, $productName),
205 Locator::SELECTOR_XPATH
207 $price = $productItem->find($this->itemInclTax);
219 $productItem = $this->_rootElement->find(
220 sprintf($this->productItemByName, $productName),
221 Locator::SELECTOR_XPATH
223 $price = $productItem->find($this->itemSubExclTax);
235 $productItem = $this->_rootElement->find(
236 sprintf($this->productItemByName, $productName),
237 Locator::SELECTOR_XPATH
239 $price = $productItem->find($this->itemSubInclTax);
251 return $this->_rootElement->find(
252 sprintf($this->productItemByName, $productName),
253 Locator::SELECTOR_XPATH
264 if (!$this->_rootElement->find($this->cartItemsContentSelector)->isVisible()) {
265 $this->browser->find($this->itemsBlock)->click();
276 return $this->_rootElement->find($this->itemsCounterSelector)->getText();
286 return $this->_rootElement->find(
'.action.viewcart');
296 $grandTotal = $this->_rootElement->find($this->grandTotalExclTax)->getText();
307 $grandTotal = $this->_rootElement->find($this->grandTotalInclTax)->getText();
318 $tax = $this->_rootElement->find($this->tax, Locator::SELECTOR_CSS);
329 $discount = $this->_rootElement->find($this->discount);
340 $subTotal = $this->_rootElement->find($this->subtotal)->getText();
351 $subTotal = $this->_rootElement->find($this->subtotalExclTax)->getText();
362 $subTotal = $this->_rootElement->find($this->subtotalInclTax)->getText();
373 $subTotal = $this->_rootElement->find($this->shippingInclTax);
384 $subTotal = $this->_rootElement->find($this->shippingExclTax);
396 preg_match(
"/^\\D*\\s*([\\d,\\.]+)\\s*\\D*$/",
$price, $matches);
397 return (isset($matches[1])) ? $matches[1] :
null;
getItemPriceInclTax($productName)
getItemSubExclTax($productName)
getItemPriceExclTax($productName)
getItemSubInclTax($productName)
$cartItemsContentSelector
getItemElement($productName)
__construct(SimpleElement $element, BlockFactory $blockFactory, BrowserInterface $browser)