Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
PopupWindow.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\Mtf\Block\Block;
9 
13 class PopupWindow extends Block
14 {
18  private $selector = '#login-preview';
19 
23  private $submitButton = '#return_url';
24 
28  private $loader = '.loader';
29 
35  public function waitForFormLoaded()
36  {
37  $this->waitForElementVisible($this->selector);
38  }
39 
46  public function process($parentWindow = null)
47  {
48  $this->browser->selectWindow();
49  $this->waitForFormLoaded();
50  $this->browser->find($this->submitButton)->click();
51  $this->browser->selectWindow($parentWindow);
52  $this->waitForElementNotVisible($this->loader);
53  }
54 }