コード例 #1
0
 /**
  * Login to Pay Pal.
  *
  * @return void
  */
 public function run()
 {
     /** Log out from previous session. */
     $this->paypalPage->getReviewBlock()->logOut();
     $payPalLoginBlock = $this->paypalPage->getLoginBlock();
     $payPalLoginBlock->fill($this->customer);
     $payPalLoginBlock->submit();
 }
コード例 #2
0
 /**
  * Login to Pay Pal.
  *
  * @return void
  */
 public function run()
 {
     $browser = $this->browser;
     $selector = $this->loader;
     $browser->waitUntil(function () use($browser, $selector) {
         $element = $browser->find($selector);
         return $element->isVisible() == false ? true : null;
     });
     /** Log out from previous session. */
     $reviewBlock = $this->paypalPage->getReviewBlock()->isVisible() ? $this->paypalPage->getReviewBlock() : $this->paypalPage->getOldReviewBlock();
     $reviewBlock->logOut();
     $payPalLoginBlock = $this->paypalPage->getLoginBlock()->isVisible() ? $this->paypalPage->getLoginBlock() : $this->paypalPage->getOldLoginBlock();
     $payPalLoginBlock->fill($this->customer);
     $payPalLoginBlock->submit();
     $reviewBlock->waitLoader();
 }