本文整理汇总了PHP中AcceptanceTester::click方法的典型用法代码示例。如果您正苦于以下问题:PHP AcceptanceTester::click方法的具体用法?PHP AcceptanceTester::click怎么用?PHP AcceptanceTester::click使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcceptanceTester
的用法示例。
在下文中一共展示了AcceptanceTester::click方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
}
}
示例2: 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]);
}
示例3: 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);
}
示例4: 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);
}
示例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);
}
示例6: 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)]);
}
示例7: 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}");
}
示例8: 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)");
}
示例9: function
public function topページ_初期表示(\AcceptanceTester $I)
{
$I->wantTo('EA0101-UC01-T01 TOPページ 初期表示');
// TOP画面に現在の受注状況、お知らせ、売り上げ状況、ショップ状況が表示されている
$I->see('受注状況', TopPage::$受付状況);
$I->see('お知らせ', TopPage::$お知らせ);
$I->see('売り上げ状況', TopPage::$売上状況);
$I->see('ショップ状況', TopPage::$ショップ状況);
// 新規受付をクリックすると受注管理画面に遷移することを確認
$I->click(TopPage::$受付状況_新規受付);
$I->see('受注マスター', self::ページタイトル);
$I->goToAdminPage();
// 購入された商品が受注管理画面のページにて反映されていることを確認
$config = Fixtures::get('config');
$findOrders = Fixtures::get('findOrders');
$NewOrders = array_filter($findOrders(), function ($Order) use($config) {
return $Order->getOrderStatus()->getId() == $config['order_new'];
});
$I->see(count($NewOrders), TopPage::$受付状況_新規受付数);
// FIXME [issue] ソート順が指定されていないのでテストが失敗する
// https://github.com/EC-CUBE/ec-cube/issues/1908
// // 入金待ちをクリックすると「受注管理>入金待ち」のページに遷移することを確認
// $I->click(TopPage::$受付状況_入金待ち);
// $I->see('受注マスター', self::ページタイトル);
// $I->seeInField(OrderManagePage::$検索条件_受注ステータス, '2'/*入金待ち*/);
// $I->goToAdminPage();
//
// // 入金済みをクリックすると「受注管理>入金済み」のページに遷移することを確認
// $I->click(TopPage::$受付状況_入金済み);
// $I->see('受注マスター', self::ページタイトル);
// $I->seeInField(OrderManagePage::$検索条件_受注ステータス, '6'/*入金済み*/);
// $I->goToAdminPage();
//
// // 取り寄せ中をクリックすると「受注管理>取り寄せ」のページに遷移することを確認
// $I->click(TopPage::$受付状況_取り寄せ中);
// $I->see('受注マスター', self::ページタイトル);
// $I->seeInField(OrderManagePage::$検索条件_受注ステータス, '4'/*取り寄せ中*/);
// $I->goToAdminPage();
// お知らせの記事をクリックすると設定されたURLに遷移することを確認
$I->executeJS('document.querySelector("iframe.link_list_wrap").setAttribute("name", "news_frame")');
$I->switchToIFrame("news_frame");
$I->click(['css' => '.news_area .link_list .tableish a:nth-child(3)']);
$I->switchToNewWindow();
$I->seeInTitle("全商品 / ECサイト構築・リニューアルは「ECオープンプラットフォームEC-CUBE」");
$I->switchToWindow();
$I->switchToIFrame();
// ショップ情報の在庫切れ商品をクリックすると商品管理ページに遷移することを確認
$I->click(TopPage::$ショップ状況_在庫切れ商品);
$I->see('商品マスター', self::ページタイトル);
$I->goToAdminPage();
// ショップ情報の会員数をクリックすると会員管理に遷移することを確認
$I->click(TopPage::$ショップ状況_会員数);
$I->see('会員マスター', self::ページタイトル);
$I->dontSeeCheckboxIsChecked(CustomerManagePage::$検索条件_仮会員);
$I->seeCheckboxIsChecked(CustomerManagePage::$検索条件_本会員);
}
示例10: 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);
}
示例11: i_can_save_this_model
public function i_can_save_this_model(\AcceptanceTester $I)
{
$value = $I->generateRandomString();
$I->clickNode('#model0-node');
$I->click('.dvs-sidebar-elements button');
$I->waitForElement('#dvs-sidebar-field-form', 5);
$I->fillField('text', $value);
$I->click('button.dvs-sidebar-save-group');
$I->wait(10);
$I->seeInDatabase('dvs_test_models', array('id' => 1, 'name' => $value));
}
示例12: 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);
}
示例13: viewProductFromTagPage
public function viewProductFromTagPage(AcceptanceTester $I)
{
$I->wantTo('view a product from tag page');
$I->amOnPage('/t');
$tagName = $I->grabTextFrom("//div[contains(@class,'tag-name')][1]");
$I->click("//div[contains(@class,'tag-container')][1]//a");
$I->see($tagName);
$productName = $I->grabTextFrom("//div[contains(@class,'product-name')][1]");
$I->click("//div[contains(@class,'product-container')][1]//a");
$I->see($productName);
}
示例14: deleteNewsTickConfirmation
/**
* @depends deleteNewsNoTickConfirmation
*/
public function deleteNewsTickConfirmation(AcceptanceTester $I)
{
$I->logInAsAnAdmin();
$I->amOnListNews();
$I->click('Edit');
$I->waitForText('Edit news item');
$I->seeInCurrentUrl('/edit_news');
$I->checkOption('#delete_confirmation');
$I->click('Delete news item');
$I->seeInCurrentUrl('/list_news');
$I->dontSee('Edit');
}
示例15: editAboutPageTest
/**
* Create an 'About' page record.
*
* @param \AcceptanceTester $I
*/
public function editAboutPageTest(\AcceptanceTester $I)
{
$I->wantTo("Edit the 'About' page as the 'author' user");
// Set up the browser
$I->setCookie('bolt_authtoken', $this->cookies['bolt_authtoken']);
$I->setCookie('bolt_session', $this->cookies['bolt_session']);
$I->amOnPage('/bolt');
$I->see('Edit', 'a');
$I->click('Edit', 'a');
$I->click('Save Page', '#savecontinuebutton');
$I->see('The changes to the Page have been saved.');
}