Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ExpressMainLogin.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Block\Form;
10 
14 class ExpressMainLogin extends Form
15 {
21  protected $expressLogin = '[name=login]';
22 
28  protected $expressOldLogin = '#loginBox';
29 
35  protected $preloaderSpinner = '#preloaderSpinner';
36 
42  public function waitForFormLoaded()
43  {
44  $this->waitForElementNotVisible($this->preloaderSpinner);
45  }
46 
52  public function getLoginBlock()
53  {
54  if ($this->_rootElement->find($this->expressLogin)->isVisible()) {
55  return $this->blockFactory->create(
56  \Magento\Paypal\Test\Block\Sandbox\ExpressLogin::class,
57  ['element' => $this->_rootElement->find($this->expressLogin)]
58  );
59  }
60  return $this->blockFactory->create(
61  \Magento\Paypal\Test\Block\Sandbox\ExpressOldLogin::class,
62  ['element' => $this->_rootElement->find($this->expressOldLogin)]
63  );
64  }
65 }