当前位置: 首页>>代码示例>>PHP>>正文


PHP AcceptanceTester::wait方法代码示例

本文整理汇总了PHP中AcceptanceTester::wait方法的典型用法代码示例。如果您正苦于以下问题:PHP AcceptanceTester::wait方法的具体用法?PHP AcceptanceTester::wait怎么用?PHP AcceptanceTester::wait使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AcceptanceTester的用法示例。


在下文中一共展示了AcceptanceTester::wait方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _before

 public function _before(AcceptanceTester $I)
 {
     $I->wantTo('Install and Configure WC');
     $I->loginAsAdmin();
     //Only if Run this test Seperately
     $I->amGoingTo('Activate Woocommerce Plugin');
     $I->amOnPluginsPage();
     //In order that the activatePlugin() works, the webdriver needs to be in Plugins page
     $I->activatePlugin('woocommerce');
     $I->amGoingTo('Run Woocommerce Setup');
     $I->waitForElement(".button-primary", 20);
     $I->click("Let's Go!");
     $I->waitForElement(".button-primary", 15);
     $I->click("Continue");
     $I->wait(1);
     $I->click("Continue");
     $I->wait(1);
     $I->click("Continue");
     $I->wait(1);
     $I->checkOption('#woocommerce_enable_cod');
     $I->click("Continue");
     $I->waitForElement(".button-secondary", 15);
     $I->click("No thanks");
     $I->wait(1);
     $I->click("Return to the WordPress Dashboard");
 }
开发者ID:helgatheviking,项目名称:woocommerce-multilingual,代码行数:26,代码来源:1003Cest.php

示例2: _before

 public function _before(AcceptanceTester $I)
 {
     $I->wantTo('Install WPML');
     $I->loginAsAdmin();
     $I->amGoingTo('Activate WPML Plugins');
     $I->amOnPluginsPage();
     //In order that the activatePlugin() works, the webdriver needs to be in Plugins page
     $I->activatePlugin('wpml-multilingual-cms');
     $I->amGoingTo('Configure WPML');
     $I->click('No thanks, I will configure myself');
     $I->click('Next');
     //Let's English as Default language
     $I->checkOption('Greek');
     $I->wait(1);
     $I->click('Next');
     $I->wait(5);
     $I->checkOption('form input[name=icl_lang_sel_footer]');
     $I->waitForElement(".button-primary", 15);
     $I->wait(1);
     $I->click('Next');
     $I->wait(3);
     $I->waitForElement(".button-primary", 15);
     $I->click('Remind me later');
     $I->wait(5);
     $I->click('Finish');
 }
开发者ID:helgatheviking,项目名称:woocommerce-multilingual,代码行数:26,代码来源:1001Cest.php

示例3: EtsySpamCest

 private function EtsySpamCest(\AcceptanceTester $I)
 {
     $I->amOnPage("/");
     $I->waitForElement('//*[@id="sign-in"]', 100);
     $I->click('//*[@id="sign-in"]');
     $I->wait(3);
     $I->fillField('input#username-existing', 'sammacad');
     $I->fillField('input#password-existing', '1!2@3#4$5%');
     $I->click('//*[@id="signin-button"]');
     $I->waitForElement('.user-nav');
     // send spam
     $result = $this->db->query("SELECT * FROM `etsy_user_list` WHERE `sent_at` is null");
     while ($row = $result->fetch_array()) {
         $shop = $row['from_where'];
         $temp = explode('/', $row['user_slug']);
         $user = $temp[sizeof($temp) - 1];
         $I->amOnPage("/people/{$user}");
         $I->click('//*[@id="tabbed-navigation-list"]/li[4]/a');
         $I->waitForElement('//*[@id="conversation-send-form"]/div[2]/div[2]/input', 100);
         $I->fillField('//*[@id="conversation-send-form"]/div[2]/div[2]/input', "Hi {$user}");
         $I->fillField('//*[@id="conversation-send-form"]/div[2]/div[2]/textarea', "Dear {$user}, I read your review on Etsy's {$shop} shop. How was your experience with them? We are creating a community for Etsy shoppers just like you! Please visit http://storeplore.com and get early access!");
         $this->db->real_query("UPDATE `etsy_user_list` SET `sent_at`= CURRENT_TIMESTAMP WHERE `user_slug` = '" . $row['user_slug'] . "'");
         $I->click('//*[@id="conversation-send-form"]/div[3]/div/button');
         $rand_sec = rand(80, 120);
         $I->wait($rand_sec);
     }
 }
开发者ID:bbig979,项目名称:shoppyst,代码行数:27,代码来源:EtsySpamCest.php

示例4: unlikeComponent

 private function unlikeComponent(\AcceptanceTester $I)
 {
     codecept_debug('unlikeComponent');
     $I->wait($this->fill_placeholder_wait);
     $pre_like_count = $I->grabTextFrom('.likes-count');
     $I->click('.ion-ios-heart');
     $I->waitForElement('.ion-ios-heart-outline', 10);
     $post_like_count = $I->grabTextFrom('.likes-count');
     $I->assertNotEquals($pre_like_count, $post_like_count);
     $I->wait($this->send_to_server_wait);
     $I->reloadPage();
     $I->wait($this->fill_placeholder_wait);
     $reload_like_count = $I->grabTextFrom('.likes-count');
     $I->assertEquals($reload_like_count, $post_like_count);
 }
开发者ID:bbig979,项目名称:shoppyst,代码行数:15,代码来源:AppCest.php

示例5: _before

 public function _before(AcceptanceTester $I)
 {
     $I->wantTo('Enable the ST, TM, MT Plugins');
     $I->loginAsAdmin();
     //Only if Run this test Seperately
     $I->amGoingTo('ST, TM, Media');
     $I->amOnPluginsPage();
     //In order that the activatePlugin() works, the webdriver needs to be in Plugins page
     $I->activatePlugin('wpml-string-translation');
     $I->wait(1);
     $I->activatePlugin('wpml-translation-management');
     $I->wait(1);
     $I->activatePlugin('wpml-media');
     //to be checked because it shows error
 }
开发者ID:helgatheviking,项目名称:woocommerce-multilingual,代码行数:15,代码来源:1002Cest.php

示例6: testShowAction

 public function testShowAction(AcceptanceTester $I)
 {
     $I->wantTo('too see inside the dashboard area');
     $I->amOnPage('/dashboard');
     $I->see('a placeholder for dashboard');
     $I->wait(3);
 }
开发者ID:Soolan,项目名称:mava-project,代码行数:7,代码来源:DashboardControllerCest.php

示例7: testOnePageCheckout

 /**
  * Tests One Page Checkout
  *
  * @group checkout
  *
  * @param $I \AcceptanceTester
  *
  * @depends testAddProductToCart
  */
 public function testOnePageCheckout(AT $I)
 {
     $I->am('Guest Customer');
     $I->wantTo('use One Page Checkout');
     $I->lookForwardTo('experience flawless checkout');
     $I->amGoingTo('place an order as a guest');
     $I->amOnPage(Page\Checkout::$URL);
     $I->amGoingTo('select the checkout type');
     $I->selectOption(Page\Checkout::$radioTypeGuest, 'guest');
     $I->click(Page\Checkout::$continueButton);
     $I->amGoingTo('fill my address');
     $I->fillField(Page\Checkout::$billingFirstname, $this->getConfig('firstname'));
     $I->fillField(Page\Checkout::$billingLastname, $this->getConfig('lastname'));
     $I->fillField(Page\Checkout::$billingEmail, $this->getConfig('email'));
     $I->selectOption(Page\Checkout::$billingCountryId, $this->getConfig('country_id'));
     $I->fillField(Page\Checkout::$billingStreet1, $this->getConfig('street'));
     $I->fillField(Page\Checkout::$billingPostcode, $this->getConfig('postcode'));
     $I->fillField(Page\Checkout::$billingCity, $this->getConfig('city'));
     $I->fillField(Page\Checkout::$billingTelephone, $this->getConfig('phone'));
     $I->click('button', Page\Checkout::$billingAddressContainer);
     $I->amGoingTo('select shipping method');
     $I->waitForElementVisible(Page\Checkout::$shippingButtonsContainer);
     $I->selectOption(Page\Checkout::$shippingMethodInput, Page\Checkout::$shippingMethod);
     $I->click('button', Page\Checkout::$shippingButtonsContainer);
     $I->waitForElementVisible(Page\Checkout::$paymentButtonsContainer);
     // $I->amGoingTo('select payment method');
     // $I->click(Page\Checkout::$paymentMethod);
     $I->click('button', Page\Checkout::$paymentButtonsContainer);
     $I->waitForElementVisible(Page\Checkout::$checkoutReviewContainer);
     $I->amGoingTo('review and finish my order');
     $I->click('button', Page\Checkout::$checkoutReviewContainer);
     $I->wait(7);
 }
开发者ID:rogyar,项目名称:Magento-Codeception,代码行数:42,代码来源:CheckoutCest.php

示例8: ClearAllCach

 /**
  * Clear cache work only at admin panel
  * @param AcceptanceTester $I Controller 
  */
 public static function ClearAllCach($I)
 {
     $I->amOnPage('/admin');
     $I->click(NavigationBarPage::$System);
     $I->click(NavigationBarPage::$SystemClearAllCach);
     $I->wait(3);
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:11,代码来源:InitTest.php

示例9: updateInvoiceDesign

 public function updateInvoiceDesign(AcceptanceTester $I)
 {
     $I->wantTo('Design my invoice');
     $I->amOnPage('/settings/invoice_design');
     $I->click('select#invoice_design_id');
     $I->click('select#invoice_design_id option:nth-child(2)');
     $I->fillField('#font_size', 10);
     $I->click('#primary_color + .sp-replacer');
     $I->executeJS('$("#primary_color").val("#7364b6")');
     $I->executeJS('$(".sp-container:nth-child(1) .sp-choose").click()');
     $I->click('#secondary_color + .sp-replacer');
     $I->executeJS('$("#secondary_color").val("#aa6709")');
     $I->executeJS('$(".sp-container:nth-child(2) .sp-choose").click()');
     /*
     $I->fillField(['name' => 'labels_item'], $this->faker->text(6));
     $I->fillField(['name' => 'labels_description'], $this->faker->text(12));
     $I->fillField(['name' => 'labels_unit_cost'], $this->faker->text(12));
     $I->fillField(['name' => 'labels_quantity'], $this->faker->text(8));
     
     $I->uncheckOption('#hide_quantity');
     $I->checkOption('#hide_paid_to_date');
     */
     $I->click('Save');
     $I->wait(3);
     $I->seeInDatabase('accounts', ['font_size' => 10]);
 }
开发者ID:hannenijhuis,项目名称:invoiceninja,代码行数:26,代码来源:InvoiceDesignCest.php

示例10: taxRates

 public function taxRates(AcceptanceTester $I)
 {
     $I->wantTo('test tax rates');
     $clientEmail = $this->faker->safeEmail;
     $productKey = $this->faker->text(10);
     $itemTaxRate = $this->faker->randomFloat(2, 5, 15);
     $itemTaxName = $this->faker->word();
     $invoiceTaxRate = $this->faker->randomFloat(2, 5, 15);
     $invoiceTaxName = $this->faker->word();
     $itemCost = $this->faker->numberBetween(1, 20);
     $total = $itemCost;
     $total += round($itemCost * $itemTaxRate / 100, 2);
     $total += round($itemCost * $invoiceTaxRate / 100, 2);
     // create tax rates
     $I->amOnPage('/tax_rates/create');
     $I->fillField(['name' => 'name'], $itemTaxName);
     $I->fillField(['name' => 'rate'], $itemTaxRate);
     $I->click('Save');
     $I->see($itemTaxName);
     $I->amOnPage('/tax_rates/create');
     $I->fillField(['name' => 'name'], $invoiceTaxName);
     $I->fillField(['name' => 'rate'], $invoiceTaxRate);
     $I->click('Save');
     $I->see($invoiceTaxName);
     // enable line item taxes
     $I->amOnPage('/settings/tax_rates');
     $I->checkOption('#invoice_item_taxes');
     $I->click('Save');
     // create product
     $I->amOnPage('/products/create');
     $I->fillField(['name' => 'product_key'], $productKey);
     $I->fillField(['name' => 'notes'], $this->faker->text(80));
     $I->fillField(['name' => 'cost'], $itemCost);
     $I->selectOption('select[name=default_tax_rate_id]', $itemTaxName . ' ' . $itemTaxRate . '%');
     $I->click('Save');
     $I->wait(1);
     $I->see($productKey);
     // create client
     $I->amOnPage('/clients/create');
     $I->fillField(['name' => 'contacts[0][email]'], $clientEmail);
     $I->click('Save');
     $I->see($clientEmail);
     // create invoice
     $I->amOnPage('/invoices/create');
     $I->selectDropdown($I, $clientEmail, '.client_select .dropdown-toggle');
     $I->fillField('table.invoice-table tbody tr:nth-child(1) #product_key', $productKey);
     $I->selectOption('#taxRateSelect', $invoiceTaxName . ' ' . $invoiceTaxRate . '%');
     $I->wait(2);
     // check total is right before saving
     $I->see("\${$total}");
     $I->click('Save');
     $I->wait(1);
     $I->see($clientEmail);
     // check total is right after saving
     $I->see("\${$total}");
     $I->amOnPage('/invoices');
     // check total is right in list view
     $I->see("\${$total}");
 }
开发者ID:joshuadwire,项目名称:invoiceninja,代码行数:59,代码来源:TaxRatesCest.php

示例11: i_can_edit_the_users_email

 public function i_can_edit_the_users_email(\AcceptanceTester $I)
 {
     $I->clickNode('#attribute3-node');
     $I->fillField('text', 'testemail@lbm.co');
     $I->click('button.dvs-sidebar-save-group');
     $I->wait(self::WAIT_TIME);
     $I->seeInDatabase('users', array('email' => 'testemail@lbm.co'));
 }
开发者ID:alpas29,项目名称:cms,代码行数:8,代码来源:EditTheUserEmailCest.php

示例12: write

 public function write(AcceptanceTester $I)
 {
     $I->wantTo('write a message');
     $I->amOnPage('/Mikroblogi');
     $I->submitForm('.microblog-submit', ['text' => 'Testowy wpis na mikroblogu']);
     $I->wait(1);
     $I->canSee('Testowy wpis na mikroblogu');
 }
开发者ID:furious-programming,项目名称:coyote,代码行数:8,代码来源:MicroblogCest.php

示例13: cloneInvoice

 public function cloneInvoice(AcceptanceTester $I)
 {
     $I->wantTo('clone an invoice');
     $I->amOnPage('/invoices/1/clone');
     $invoiceNumber = $I->grabAttributeFrom('#invoice_number', 'value');
     $I->executeJS('submitAction()');
     $I->wait(1);
     $I->see($invoiceNumber);
 }
开发者ID:hannenijhuis,项目名称:invoiceninja,代码行数:9,代码来源:InvoiceCest.php

示例14: ensureThatHomePageWorks

 public function ensureThatHomePageWorks(AcceptanceTester $I)
 {
     $I->amOnPage(Url::toRoute('/site/index'));
     $I->see('My Company');
     $I->seeLink('About');
     $I->click('About');
     $I->wait(2);
     // wait for page to be opened
     $I->see('This is the About page.');
 }
开发者ID:chizdrel,项目名称:yii2-app-basic,代码行数:10,代码来源:HomeCest.php

示例15: i_can_create_a_new_user

 public function i_can_create_a_new_user(\AcceptanceTester $I)
 {
     $I->clickNode('#creatorcreator-933e76acb06dec2ba6c31ba9c058a4e9-node');
     $I->click('button[data-creator-attribute-name="Name"]');
     $I->waitForElement('#dvs-sidebar-field-form', self::WAIT_TIME);
     $I->fillField('text', 'tester');
     $I->click('a[data-breadcrumb-id="0"]');
     $I->wait(1);
     $I->click('button[data-creator-attribute-name="Email"]');
     $I->waitForElement('#dvs-sidebar-field-form', self::WAIT_TIME);
     $I->fillField('text', 'testemail@lbm.co');
     $I->click('a[data-breadcrumb-id="0"]');
     $I->wait(1);
     $I->click('button[data-creator-attribute-name="Password"]');
     $I->waitForElement('#dvs-sidebar-field-form', self::WAIT_TIME);
     $I->fillField('text', 'password');
     $I->click('button.dvs-sidebar-save-group');
     $I->wait(self::WAIT_TIME);
     $I->seeInDatabase('users', array('email' => 'testemail@lbm.co'));
 }
开发者ID:alpas29,项目名称:cms,代码行数:20,代码来源:CreateNewUserCest.php


注:本文中的AcceptanceTester::wait方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。