Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SignifydLogin.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\Mtf\Block\Form;
9 use Magento\Mtf\Client\Element\SimpleElement;
10 use Magento\Mtf\Fixture\FixtureInterface;
11 
15 class SignifydLogin extends Form
16 {
22  private $loginButton = '[type=submit]';
23 
29  private $notificationCloseButton = '.wm-close-button';
30 
34  public function fill(FixtureInterface $fixture, SimpleElement $element = null)
35  {
36  $this->closeNotification();
37 
38  return parent::fill($fixture, $element);
39  }
40 
46  public function login()
47  {
48  $this->closeNotification();
49  $this->_rootElement->find($this->loginButton)->click();
50  }
51 
57  private function closeNotification(): void
58  {
59  $notification = $this->browser->find($this->notificationCloseButton);
60  if ($notification->isVisible()) {
61  $notification->click();
62  }
63  }
64 }
fill(FixtureInterface $fixture, SimpleElement $element=null)
$element
Definition: element.phtml:12