Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ExpressReview.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Block\Block;
10 use Magento\Mtf\Client\Locator;
11 
15 class ExpressReview extends Block
16 {
22  protected $continue = '#confirmButtonTop';
23 
29  protected $total = '#transactionCart .ng-binding';
30 
37  protected function escapeCurrency($price)
38  {
39  return preg_replace("/[^0-9\.,]/", '', $price);
40  }
41 
47  public function getTotal()
48  {
49  $this->waitForElementVisible($this->total);
50  $total = $this->_rootElement->find($this->total, Locator::SELECTOR_CSS)->getText();
51  return $this->escapeCurrency($total);
52  }
53 
59  public function reviewAndContinue()
60  {
61  $this->waitForElementVisible($this->continue);
62  $this->_rootElement->find($this->continue)->click();
63  }
64 }
$price