當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Browser::switchToFrame方法代碼示例

本文整理匯總了PHP中Magento\Mtf\Client\Browser::switchToFrame方法的典型用法代碼示例。如果您正苦於以下問題:PHP Browser::switchToFrame方法的具體用法?PHP Browser::switchToFrame怎麽用?PHP Browser::switchToFrame使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Mtf\Client\Browser的用法示例。


在下文中一共展示了Browser::switchToFrame方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: run

 /**
  * Fill credit card in i-frame step.
  *
  * @return array
  */
 public function run()
 {
     $this->checkoutOnepage->getReviewBlock()->clickContinue();
     $this->browser->switchToFrame(new Locator($this->iFrameSelector));
     $methodName = 'get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $this->payment['method']))) . 'Form';
     $form = $this->checkoutOnepage->{$methodName}();
     $element = $this->browser->find('body');
     $form->fill($this->payment['cc'], $element);
     $form->clickPayNow($element);
     return ['orderId' => $this->checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId()];
 }
開發者ID:hientruong90,項目名稱:ee_14_installer,代碼行數:16,代碼來源:FillCreditCardInIFrameStep.php

示例2: processAssert

 /**
  * Assert that content of created cms page displayed in main content section and equals passed from fixture.
  *
  * @param CmsPage $cms
  * @param CmsPageIndex $cmsPageIndex
  * @param FrontendCmsPage $frontendCmsPage
  * @param CmsPageEdit $cmsPageEdit
  * @param Browser $browser
  * @return void
  */
 public function processAssert(CmsPage $cms, CmsPageIndex $cmsPageIndex, FrontendCmsPage $frontendCmsPage, CmsPageEdit $cmsPageEdit, Browser $browser)
 {
     $cmsPageIndex->open();
     $cmsPageIndex->getCmsPageGridBlock()->searchAndOpen(['title' => $cms->getTitle()]);
     $cmsPageEdit->getPageMainActions()->preview();
     $browser->selectWindow();
     $frontendCmsPage->getTemplateBlock()->waitLoader();
     $browser->switchToFrame(new Locator($this->iFrameSelector));
     $element = $browser->find('body');
     $fixtureContent = $cms->getContent();
     \PHPUnit_Framework_Assert::assertContains($fixtureContent['content'], $frontendCmsPage->getCmsPageContentBlock()->getPageContent($element), 'Wrong content is displayed.');
     if ($cms->getContentHeading()) {
         \PHPUnit_Framework_Assert::assertEquals(strtolower($cms->getContentHeading()), strtolower($frontendCmsPage->getCmsPageContentBlock()->getPageTitle($element)), 'Wrong title is displayed.');
     }
     if (isset($fixtureContent['widget'])) {
         foreach ($fixtureContent['widget']['preset'] as $widget) {
             \PHPUnit_Framework_Assert::assertTrue($frontendCmsPage->getCmsPageContentBlock()->isWidgetVisible($widget), "Widget '{$widget['widget_type']}' is not displayed.");
         }
     }
 }
開發者ID:hientruong90,項目名稱:ee_14_installer,代碼行數:30,代碼來源:AssertCmsPagePreview.php

示例3: switchToFrame

 /**
  * Switch to frame.
  *
  * @param Browser $browser
  * @return void
  */
 protected function switchToFrame(Browser $browser)
 {
     $selector = $this->loader;
     $browser->waitUntil(function () use($browser, $selector) {
         return $browser->find($selector)->isVisible() == false ? true : null;
     });
     $browser->switchToFrame(new Locator($this->iFrameSelector));
 }
開發者ID:cewolf2002,項目名稱:magento,代碼行數:14,代碼來源:AssertCmsPagePreview.php


注:本文中的Magento\Mtf\Client\Browser::switchToFrame方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。