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


PHP AcceptanceTester::fillField方法代码示例

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


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

示例1: create

 public function create(AcceptanceTester $I)
 {
     $clientEmail = $this->faker->safeEmail;
     $productKey = $this->faker->text(10);
     $amount = rand(1, 10);
     $I->wantTo('enter a payment');
     // create client
     $I->amOnPage('/clients/create');
     $I->fillField(['name' => 'contacts[0][email]'], $clientEmail);
     $I->click('Save');
     $I->see($clientEmail);
     // create product
     $I->amOnPage('/products/create');
     $I->fillField(['name' => 'product_key'], $productKey);
     $I->fillField(['name' => 'notes'], $this->faker->text(80));
     $I->fillField(['name' => 'cost'], $this->faker->numberBetween(11, 20));
     $I->click('Save');
     $I->see($productKey);
     // 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->click('Save');
     $I->see($clientEmail);
     $I->amOnPage('/payments/create');
     $I->selectDropdown($I, $clientEmail, '.client-select .dropdown-toggle');
     $I->selectDropdownRow($I, 1, '.invoice-select .combobox-container');
     $I->fillField(['name' => 'amount'], $amount);
     $I->selectDropdown($I, 'Cash', '.payment-type-select .dropdown-toggle');
     $I->selectDataPicker($I, '#payment_date', 'now + 1 day');
     $I->fillField(['name' => 'transaction_reference'], $this->faker->text(12));
     $I->click('Save');
     $I->see('Successfully created payment');
     $I->seeInDatabase('payments', ['amount' => number_format($amount, 2)]);
 }
开发者ID:joshuadwire,项目名称:invoiceninja,代码行数:35,代码来源:PaymentCest.php

示例2: 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

示例3: submitTheForm

 private function submitTheForm(AcceptanceTester $I, $attributes)
 {
     $I->waitForElement('form', 2);
     $I->fillField('form #title', $attributes['title']);
     $I->fillField('form #content', $attributes['content']);
     $I->click('form .btn-primary');
 }
开发者ID:CENTRUM21,项目名称:laravel-apz,代码行数:7,代码来源:ArticleCest.php

示例4: editCategoryNotVisibleTime

 public function editCategoryNotVisibleTime(AcceptanceTester $I)
 {
     $I->logInAsAnAdmin();
     $I->amOnEditCategory(CI_EDITABLE_CATEGORY_ID);
     $title = time() . 'title';
     $I->fillField('title', $title);
     $I->checkOption('#exposed');
     $from = date_time(time() - 10000);
     $until = date_time(time() - 100);
     $I->fillField('available_from', $from);
     $I->fillField('available_until', $until);
     $I->click('Save changes');
     $I->waitForText('Edit category');
     $I->seeCheckboxIsChecked('#exposed');
     $I->seeInField('available_from', $from);
     $I->seeInField('available_until', $until);
     $I->amOnPage('/challenges');
     $I->see($title);
     $I->amOnPage('/challenges?category=' . to_permalink($title));
     $I->see('Category unavailable');
     $I->see('This category is not available. It is open from ' . $from);
     $I->see('until ' . $until);
     $I->amOnAdminHome();
     $I->see($title);
 }
开发者ID:aallen,项目名称:mellivora,代码行数:25,代码来源:ManageCategoryCest.php

示例5: createExpense

 public function createExpense(AcceptanceTester $I)
 {
     $I->wantTo('Create an expense');
     $vendorName = $this->faker->name;
     $clientEmail = $this->faker->safeEmail;
     $amount = $this->faker->numberBetween(10, 20);
     // create vendor
     $I->amOnPage('/vendors/create');
     $I->fillField(['name' => 'name'], $vendorName);
     $I->click('Save');
     $I->see($vendorName);
     $vendorId = $I->grabFromDatabase('vendors', 'id', ['name' => $vendorName]);
     // create client
     $I->amOnPage('/clients/create');
     $I->fillField(['name' => 'contacts[0][email]'], $clientEmail);
     $I->click('Save');
     $I->see($clientEmail);
     // create expense
     $I->amOnPage('/expenses/create');
     $I->fillField(['name' => 'amount'], $amount);
     $I->selectDropdown($I, $vendorName, '.vendor-select .dropdown-toggle');
     $I->selectDropdown($I, $clientEmail, '.client-select .dropdown-toggle');
     $I->click('Save');
     $I->seeInDatabase('expenses', ['vendor_id' => $vendorId]);
     // invoice expense
     $I->executeJS('submitAction(\'invoice\')');
     $I->click('Save');
     $I->wait(1);
     $I->see($clientEmail);
     $I->see($amount);
 }
开发者ID:sseshachala,项目名称:invoiceninja,代码行数:31,代码来源:ExpenseCest.php

示例6: doAddMenuOptionValue

 public function doAddMenuOptionValue(\AcceptanceTester $I, $num, $name, $price, $quantity)
 {
     $I->click('#tfoot .action .btn-primary');
     $I->selectOption("#option-value{$num} select", $name);
     $I->fillField("menu_options[1][option_values][{$num}][price]", $price);
     $I->fillField("menu_options[1][option_values][{$num}][quantity]", $quantity);
     $I->click("#option-value{$num} label.btn:not(.active)");
 }
开发者ID:allrested,项目名称:TastyIgniter,代码行数:8,代码来源:Acceptance.php

示例7: checkIfLogin

 /**
  * Define custom actions here
  */
 function checkIfLogin(\AcceptanceTester $I)
 {
     //if ($I->loadSessionSnapshot('login')) return;
     $I->amOnPage('/login');
     $I->fillField(['name' => 'email'], Fixtures::get('username'));
     $I->fillField(['name' => 'password'], Fixtures::get('password'));
     $I->click('Let\'s go');
     //$I->saveSessionSnapshot('login');
 }
开发者ID:njmube,项目名称:invoice-ninja,代码行数:12,代码来源:AcceptanceTester.php

示例8: logIn

 private function logIn(\AcceptanceTester $I)
 {
     $I->amOnPage("/");
     $I->waitForElement('//*[@id="doc"]/div[1]/div/div[1]/div[2]/button', 100);
     $I->click('//*[@id="doc"]/div[1]/div/div[1]/div[2]/button');
     $I->fillField('//*[@id="signin-email"]', 'brconsulting79@gmail.com');
     $I->fillField('//*[@id="signin-password"]', 'lovelove79');
     $I->click('//*[@id="login-dialog-dialog"]/div[2]/div[2]/div[2]/form/input[1]');
     $I->waitForElement('.bird-topbar-etched', 100);
 }
开发者ID:bbig979,项目名称:shoppyst,代码行数:10,代码来源:TwitterFollowerCest.php

示例9: logIn

 private function logIn(\AcceptanceTester $I)
 {
     $I->amOnPage("/");
     $I->waitForElement('//*[@id="welcome"]/div[1]/div[1]/a[2]', 100);
     $I->click('//*[@id="welcome"]/div[1]/div[1]/a[2]');
     $I->waitForElement('//*[@id="signin-login-field"]', 100);
     $I->fillField('//*[@id="signin-login-field"]', 'sam.macad@gmail.com');
     $I->fillField('//*[@id="signin-password-field"]', '1!2@3#4$5%');
     $I->click('//*[@id="new_user"]/div[2]/input');
     $I->waitForElement('//*[@id="navbar-user-dynamic"]/ul/li[2]/a[1]/img', 100);
 }
开发者ID:bbig979,项目名称:shoppyst,代码行数:11,代码来源:WaneloSpamCest.php

示例10: submit

 /**
  * Submit the project create/update form.
  * @param \AcceptanceTester|\FunctionalTester $I
  * @param array                               $fields
  */
 public static function submit($I, $fields)
 {
     if ($fields['image']) {
         $I->attachFile('#uploadform-newimage', $fields['image']);
     }
     $I->fillField(['name' => 'Project[name]'], $fields['name']);
     $I->selectOption(['name' => 'Project[coordinator]'], $fields['coordinator']);
     $I->fillField(['name' => 'Project[status]'], $fields['status']);
     $I->fillField(['name' => 'UploadForm[newImageDescription][]'], $fields['imageDescription']);
     $I->click('#project-form button');
 }
开发者ID:rhamlet1,项目名称:Hazid,代码行数:16,代码来源:FormPageFragment.php

示例11: login

 public function login(AcceptanceTester $I)
 {
     $I->amOnPage(Url::toRoute('/site/login'));
     $I->see('Введите логин и пароль для входа в систему:');
     $I->fillField('LoginForm[username]', 'admin');
     $I->fillField('LoginForm[password]', 'admin');
     $I->click('login-button');
     $I->wait(2);
     // wait for button to be clicked
     $I->see('Главное меню');
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:11,代码来源:LoginCest.php

示例12: register

 public function register(\AcceptanceTester $I)
 {
     $I->amGoingTo('register');
     $I->amOnPage('/auth/register');
     $I->fillField('name', 'codeception');
     $I->fillField('password', 'acceptance');
     $I->fillField('email', 'marcel.patzwahl+cept@gmail.com');
     $I->click('submit');
     $I->see('Registered successfully!');
     $I->seeLink('Go back to Home');
     $I->click('Go back to Home');
     $I->seeInCurrentUrl('/');
 }
开发者ID:snowiow,项目名称:eternaldeztiny,代码行数:13,代码来源:AuthCest.php

示例13: ensureThatLoginWorks

 public function ensureThatLoginWorks(AcceptanceTester $I)
 {
     $I->amOnPage(Url::toRoute('/user/login'));
     $I->see('Login', 'h1');
     $I->amGoingTo('try to login with correct credentials');
     $I->fillField('input[name="LoginForm[username]"]', 'admin');
     $I->fillField('input[name="LoginForm[password]"]', 'admin');
     $I->click('login-button');
     $I->wait(2);
     // wait for button to be clicked
     $I->expectTo('see user info');
     $I->see('Logout');
 }
开发者ID:noogen-projects,项目名称:yii2-app-start,代码行数:13,代码来源:LoginCest.php

示例14: logsInUserWithProperCredentials

 public function logsInUserWithProperCredentials(AcceptanceTester $I)
 {
     $I->am('Site Owner');
     $I->wantTo('login to a password-protected area');
     $I->lookForwardTo('perform administrative tasks');
     $I->amOnPage('/admin');
     $I->seeCurrentUrlEquals('/login');
     $I->fillField('email', 'jeffrey@envato.com');
     $I->fillField('password', '1234');
     $I->click('Login');
     $I->seeCurrentUrlEquals('/admin');
     $I->see('Admin Area', 'h1');
 }
开发者ID:joyhuang-note,项目名称:laravel-testing-decoded,代码行数:13,代码来源:LoginCest.php

示例15: contactFormCanBeSubmitted

 public function contactFormCanBeSubmitted(AcceptanceTester $I)
 {
     $I->amGoingTo('submit contact form with correct data');
     $I->fillField('#contactform-name', 'tester');
     $I->fillField('#contactform-email', 'tester@example.com');
     $I->fillField('#contactform-subject', 'test subject');
     $I->fillField('#contactform-body', 'test content');
     $I->fillField('#contactform-verifycode', 'testme');
     $I->click('contact-button');
     $I->wait(2);
     // wait for button to be clicked
     $I->dontSeeElement('#contact-form');
     $I->see('Thank you for contacting us. We will respond to you as soon as possible.');
 }
开发者ID:chizdrel,项目名称:yii2-app-basic,代码行数:14,代码来源:ContactCest.php


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