Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
MultishippingAgreementReview.php
Go to the documentation of this file.
1 <?php
8 
9 use \Magento\Multishipping\Test\Block\Checkout\Overview;
11 use Magento\Mtf\Client\Locator;
12 
18 {
24  protected $notification = 'div.mage-error';
25 
31  protected $agreement = './/div[contains(@id, "checkout-review-submit")]//label[.="%s"]';
32 
38  protected $agreementCheckbox = 'input[name^=agreement]';
39 
45  public function getNotificationMassage()
46  {
47  return $this->_rootElement->find($this->notification)->getText();
48  }
49 
56  public function setAgreement($value)
57  {
58  $this->_rootElement->find($this->agreementCheckbox, Locator::SELECTOR_CSS, 'checkbox')->setValue($value);
59  }
60 
67  public function checkAgreement(CheckoutAgreement $agreement)
68  {
69  return $this->_rootElement
70  ->find(sprintf($this->agreement, $agreement->getCheckboxText()), Locator::SELECTOR_XPATH)->isVisible();
71  }
72 }
$value
Definition: gender.phtml:16