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


PHP AcceptanceTester::seeElement方法代码示例

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


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

示例1: i_see_the_grid_buttons

 public function i_see_the_grid_buttons(\AcceptanceTester $I)
 {
     $I->clickNode('#creatorcreator-933e76acb06dec2ba6c31ba9c058a4e9-node');
     $I->seeElement('button[data-creator-attribute-name="Name"]');
     $I->seeElement('button[data-creator-attribute-name="Email"]');
     $I->seeElement('button[data-creator-attribute-name="Password"]');
 }
开发者ID:alpas29,项目名称:cms,代码行数:7,代码来源:CreateNewUserCest.php

示例2: testFindRafflerWinner

 /**
  * @param AcceptanceTester $I
  */
 public function testFindRafflerWinner(AcceptanceTester $I)
 {
     $I->amOnPage('/');
     $visits = mt_rand(50, 1000);
     $I->seeElement('h1');
     $i = 0;
     while ($visits > $i++) {
         $I->reloadPage();
         $I->seeElement('h1');
     }
     $winner = $I->grabTextFrom('h1');
     $file = fopen("/vagrant/winner.txt", "w");
     fwrite($file, PHP_EOL . "The winner is: " . $winner . PHP_EOL);
     fclose($file);
 }
开发者ID:rpkamp,项目名称:rafflers,代码行数:18,代码来源:RafflerRunnerCest.php

示例3: loginWithoutEmail

 function loginWithoutEmail(\AcceptanceTester $I, \Page\Login $loginPage)
 {
     $I->wantTo("Check login with No Email and Valid Password");
     $loginPage->loginWithPasswordOnly('debby');
     $I->seeElement('div[class = "control-group email error"]');
     $I->dontSeeInCurrentUrl('activities');
 }
开发者ID:suj24,项目名称:TestDemo,代码行数:7,代码来源:LoginTestCest.php

示例4: it_should_render_extended_shortcode

 /**
  * @test
  * it should render extended shortcode
  */
 public function it_should_render_extended_shortcode(\AcceptanceTester $I)
 {
     $content = 'Lorem ipsum [idlikethis]Some idea of mine[/idlikethis]';
     $I->havePostInDatabase(['post_name' => 'foo', 'post_content' => $content]);
     $I->amOnPage('/foo');
     $text = "Some idea of mine";
     $I->seeElement('.idlikethis-button[data-text="' . $text . '"] button');
 }
开发者ID:lucatume,项目名称:idlikethis,代码行数:12,代码来源:ShortcodeCest.php

示例5: testAddProductToCart

 /**
  * Tests add product to cart
  *
  * @group checkout
  *
  * @param $I \AcceptanceTester
  *
  */
 public function testAddProductToCart(AT $I)
 {
     $I->am('Visitor');
     $I->wantTo('Add product to cart');
     $I->amGoingTo('open category page');
     $I->amOnPage(Page\Catalog::$CATEGORY_URL);
     $I->expectTo('see category page');
     $I->amGoingTo('open product page');
     $I->click(Page\Catalog::$categoryFirstProduct);
     $I->expectTo('see product page');
     $I->seeElement(Page\Catalog::$productBody);
     $I->amGoingTo('submit the form');
     $I->submitForm(Page\Catalog::$addToCartForm, array());
     $I->expectTo('see the cart page');
     $I->seeCurrentUrlEquals(Page\Checkout::$CART_URL);
     $I->expectTo('see a success message');
     $I->seeElement(Page\Catalog::$successMessage);
 }
开发者ID:rogyar,项目名称:Magento-Codeception,代码行数:26,代码来源:CheckoutCest.php

示例6: addnewDocfiles

 /**
  * @depends openDocfiles
  */
 public function addnewDocfiles(AcceptanceTester $I)
 {
     // excel
     $I->attachFile('UploadDocFile[docFile]', 'files/excel.xlsx');
     $I->wait(2);
     $I->click('//a[contains(@title, "Загрузить выбранные файлы")]');
     $I->wait(2);
     $I->seeElement('//td/a[contains(text(),"excel.xlsx")]/preceding::td/span/i[@class="fa fa-file-excel-o"]/preceding::td/button[@title="Удалить"]');
     $I->dontSeeElement('//span[@style="text-decoration: line-through" and text() = "excel.xlsx"]');
     // word
     $I->attachFile('UploadDocFile[docFile]', 'files/word.docx');
     $I->wait(2);
     $I->click('//a[contains(@title, "Загрузить выбранные файлы")]');
     $I->wait(2);
     $I->seeElement('//td/a[contains(text(),"word.docx")]/preceding::td/span/i[@class="fa fa-file-word-o"]/preceding::td/button[@title="Удалить"]');
     $I->dontSeeElement('//span[@style="text-decoration: line-through" and text() = "word.docx"]');
     // jpg
     $I->attachFile('UploadDocFile[docFile]', 'files/jpg.jpg');
     $I->wait(2);
     $I->click('//a[contains(@title, "Загрузить выбранные файлы")]');
     $I->wait(2);
     $I->seeElement('//td/a[contains(text(),"jpg.jpg")]/preceding::td/span/i[@class="fa fa-file-image-o"]/preceding::td/button[@title="Удалить"]');
     $I->dontSeeElement('//span[@style="text-decoration: line-through" and text() = "jpg.jpg"]');
     // png
     $I->attachFile('UploadDocFile[docFile]', 'files/png.png');
     $I->wait(2);
     $I->click('//a[contains(@title, "Загрузить выбранные файлы")]');
     $I->wait(2);
     $I->seeElement('//td/a[contains(text(),"png.png")]/preceding::td/span/i[@class="fa fa-file-image-o"]/preceding::td/button[@title="Удалить"]');
     $I->dontSeeElement('//span[@style="text-decoration: line-through" and text() = "png.png"]');
     //txt
     $I->attachFile('UploadDocFile[docFile]', 'files/text.txt');
     $I->wait(2);
     $I->click('//a[contains(@title, "Загрузить выбранные файлы")]');
     $I->wait(2);
     $I->seeElement('//td/a[contains(text(),"text.txt")]/preceding::td/span/i[@class="fa fa-file-text-o"]/preceding::td/button[@title="Удалить"]');
     $I->dontSeeElement('//span[@style="text-decoration: line-through" and text() = "text.txt"]');
     //unknown
     $I->attachFile('UploadDocFile[docFile]', 'files/unknown.unk');
     $I->wait(2);
     $I->see('Разрешена загрузка файлов только со следующими расширениями: png, jpg, jpeg, tiff, pdf, xls, xlsx, doc, docx, txt.');
     $I->click('//a[contains(@title, "Загрузить выбранные файлы")]');
     $I->wait(2);
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:47,代码来源:SpravDocfilesCest.php

示例7: doFindTable

 public function doFindTable(\AcceptanceTester $I)
 {
     $I->amGoingTo('find a table in the selected restaurant');
     $I->lookForwardTo('reserve a reservation time slot');
     $I->amOnPage('/reservation');
     $I->seeElement('.panel-find-table');
     $I->selectOption('location', 'Lewisham');
     $I->selectOption('guest_num', '4');
     $I->fillField('reserve_date', date('d-m-Y', strtotime('+ 1 month', time())));
     $I->fillField('reserve_time', '2:45 PM');
     $I->click('Find Table', '#find-table-form');
     $I->expect('success with available reservation times slot displayed');
     $I->seeElement('.panel-time-slots');
     $I->seeNumberOfElements('#time-slots .btn-group > .btn', 5);
     // 5 elements
     $I->click('#time-slots .btn-group > .btn:nth-child(4)');
     $I->click('Select Time', '#find-table-form');
     $I->expectTo('see the reservation summary');
     $I->seeElement('.panel-summary');
 }
开发者ID:allrested,项目名称:TastyIgniter,代码行数:20,代码来源:Acceptance.php

示例8: submitIncorrect

 public function submitIncorrect(AcceptanceTester $I)
 {
     $I->logInAsANormalUser();
     $I->amOnPage('/challenges?category=' . to_permalink(CI_DEFAULT_CATEGORY_TITLE));
     $I->see(CI_DEFAULT_CHALLENGE_TITLE);
     $I->see(CI_DEFAULT_CHALLENGE_DESCRIPTION);
     $flag_field = '#flag-input-' . CI_DEFAULT_CHALLENGE_ID;
     $I->fillField($flag_field, 'NOT_THE_FLAG');
     $I->click('#flag-submit-' . CI_DEFAULT_CHALLENGE_ID);
     $I->seeInCurrentUrl('status=incorrect');
     $I->seeElement($flag_field);
 }
开发者ID:aallen,项目名称:mellivora,代码行数:12,代码来源:SubmitFlagCest.php

示例9: tryToTransferFundsBetweenMembers

 public function tryToTransferFundsBetweenMembers(AcceptanceTester $I)
 {
     $I->am('ewallet member');
     $I->wantTo('pay a debt');
     $I->lookForwardTo('transfer funds to my friend');
     $I->amOnPage(TransferFundsPage::$formPage);
     $I->selectOption(TransferFundsPage::$toMember, 'Luis Montealegre');
     $I->fillField(TransferFundsPage::$amount, 5);
     $I->click(TransferFundsPage::$transfer);
     $I->seeCurrentUrlMatches('/' . TransferFundsPage::$transferPage . '/');
     $I->seeElement(TransferFundsPage::$successMessage);
 }
开发者ID:zoek1,项目名称:php-testing-tools,代码行数:12,代码来源:TransferFundsCest.php

示例10: grabDragonInfo

 public function grabDragonInfo(AcceptanceTester $I)
 {
     $this->dragons = json_decode(file_get_contents('dragons.json'));
     foreach ($this->dragons as $index => $dragonName) {
         if (in_array($dragonName, array_keys($this->dragonInfo))) {
             continue;
         }
         $I->wantTo("Read data of dragon {$dragonName}");
         $I->amOnPage("/wiki/{$dragonName}");
         $I->waitForElementVisible("#WikiaPageHeader > div > div.header-column.header-title");
         try {
             $I->see("Article {$dragonName} was not found");
         } catch (\Exception $e) {
             unset($this->dragons[$index]);
             continue;
         }
         $isClassicDragon = true;
         try {
             $I->seeElement("#mw-content-text > table.infobox.Template > tbody");
         } catch (\Exception $e) {
             $isClassicDragon = false;
         }
         if ($isClassicDragon) {
             $dragon = new Dragon();
             $dragon->name = $dragonName;
             $dragon->fishPerHour = $I->grabTextFrom("//*[@id=\"mw-content-text\"]/table[1]/tbody/tr[td//text()[contains(., 'Fish.png')]]/td[2]");
             $dragon->woodPerHour = $I->grabTextFrom("//*[@id=\"mw-content-text\"]/table[1]/tbody/tr[td//text()[contains(., 'Wood.png')]]/td[2]");
             try {
                 $dragon->collectionTime = $I->grabTextFrom("//*[@id=\"mw-content-text\"]/table[1]/tbody/tr[td//text()[contains(., 'Time.png')]]/td[2]");
             } catch (\Exception $e) {
                 $dragon->collectionTime = "TODO: add";
             }
             $dragon->iron = $I->grabTextFrom("//*[@id=\"mw-content-text\"]/table[1]/tbody/tr[td//text()[contains(., 'Iron-Icon.png')]]/td[2]");
             if ($dragon->iron != "Cannot Collect") {
                 $dragon->ironCollectionTime = $I->grabTextFrom("//*[@id=\"mw-content-text\"]/table[1]/tbody/tr[td//text()[contains(., 'Time.png')]][2]/td[2]");
             } else {
                 $dragon->ironCollectionTime = "Cannot Collect";
             }
             try {
                 $dragon->battleRange = $I->grabTextFrom("//*[@id=\"mw-content-text\"]/table[1]/tbody/tr[td//text()[contains(., 'Range_Icon.png')]]/td[2]");
             } catch (\Exception $e) {
                 $dragon->battleRange = "TODO: add";
             }
             $this->dragonInfo[$dragonName] = $dragon;
         } else {
             $this->dragonInfo[$dragonName] = "Not classic dragon.";
         }
     }
 }
开发者ID:racinmat,项目名称:RiseOfBerkParser,代码行数:49,代码来源:DownloaderCest.php

示例11: submitASession

 /**
  * @param \AcceptanceTester $I
  */
 public function submitASession(AcceptanceTester $I)
 {
     $I->am('an attendee');
     $I->wantTo('submit a session');
     $I->expect('to be able a submit a new session');
     // Login user.
     $I->amOnPage('/user/login');
     $I->submitForm('#user-login-form', ['name' => 'user1', 'pass' => '123456']);
     $I->seeElement('body.user-logged-in');
     // Fill session submission.
     $I->amOnPage('/node/add/session');
     $node_title = $this->faker->text(30);
     $I->fillField('title[0][value]', $node_title);
     $I->fillCkEditorByName('body[0][value]', $this->faker->text(100));
     $I->fillField('field_author[0][target_id]', 'user1 (2)');
     $I->selectOption('field_exp_level', 0);
     $I->selectOption('field_session_track', 'development');
     $I->makeScreenshot('session_form');
     $I->submitForm('#node-session-form', [], 'op');
     $I->makeScreenshot('session_view');
     $I->see($node_title, '.l-content');
 }
开发者ID:itamair,项目名称:ddd-website,代码行数:25,代码来源:SessionCest.php

示例12: openUpdateDolzh

 /**
  * @depends checkUniqueDolzh
  */
 public function openUpdateDolzh(AcceptanceTester $I)
 {
     $I->click('//td[text()="МЕДСЕСТРА"]/preceding-sibling::td/a[@title="Обновить"]');
     $I->wait(2);
     $I->fillField('Dolzh[dolzh_name]', 'Старшая медсестра');
     $I->click('//button[contains(text(), "Обновить")]');
     $I->wait(2);
     $I->seeElement(['id' => 'dolzhgrid_gw']);
     $I->see('СТАРШАЯ МЕДСЕСТРА');
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:13,代码来源:SpravDolzhCest.php

示例13: array

$I->see('welcome admin');
// search_multi_catloc
$I->amOnPage('/oc-panel/Config/update/search_multi_catloc');
$I->fillField('#formorm_config_value', '1');
$I->click('button[type="submit"]');
$I->see('Item updated. Please to see the changes delete the cache');
$I->amOnPage('/search.html');
$I->see('Search', 'h1');
$I->selectOption('form select[id=category]', array('Jobs', 'House'));
$I->click("submit");
$I->see('title for the ad', 'a');
$I->see('just random title here', 'a');
$I->see('another great title', 'a');
$I->see('some nice title here', 'a');
$I->amOnPage('/search.html');
$I->see('Search', 'h1');
$I->selectOption('form select[id=location]', array('London', 'Madrid'));
$I->click("submit");
$I->dontSee('title for the ad', 'a');
$I->dontSee('just random title here', 'a');
$I->see('another great title', 'a');
$I->see('some nice title here', 'a');
$I->amOnPage('/oc-panel/Config/update/search_multi_catloc');
$I->fillField('#formorm_config_value', '0');
$I->click('button[type="submit"]');
$I->see('Item updated. Please to see the changes delete the cache');
$I->amOnPage('/search.html?title=&category[]=house&category[]=jobs&price-min=&price-max=&submit=');
$I->seeElement('div', ['id' => 'kohana_error']);
$I->amOnPage('/search.html?title=&location[]=madrid&location[]=london&price-min=&price-max=&submit=');
$I->seeElement('div', ['id' => 'kohana_error']);
$I->amOnPage('/');
开发者ID:Chinese1904,项目名称:openclassifieds2,代码行数:31,代码来源:MultiCategoryLocationSearchCept.php

示例14: AcceptanceTester

<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('verify the add new recipe page has required has information');
$I->amOnPage('/add-new-recipe');
$I->see('Tilføj ny opskrift til databasen', 'h2');
/*
 * Checking the basic information inputs exists
 */
$I->seeElement('#name');
$I->seeElement('#storage');
$I->seeElement('#guide');
/*
 * Checking the different types of recipes exists
 */
$I->seeElement('html/body/div[5]/form/div[1]/select/option[1]');
$I->seeElement('html/body/div[5]/form/div[1]/select/option[2]');
/*
 * Checking the tables exists
 */
$I->seeElement('table');
$I->seeElement('#plantTable');
$I->seeElement('#ingredientTable');
/*
 * Checking submit btn exists
 */
$I->seeElement('html/body/div[5]/form/div[3]/input');
/*
 * Checking the links exists
 */
$I->seeLink('Forside');
开发者ID:Opstrup,项目名称:naturens_spisekammer,代码行数:31,代码来源:AddNewRecipePageCept.php

示例15: AcceptanceTester

<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('see the main-header id on the main site header on a single site');
// set the theme to `_blogs`
$I->haveOptionInDatabase('template', 'Twentysixteen');
$I->haveOptionInDatabase('stylesheet', '_blogs');
$I->haveOptionInDatabase('current_theme', '_Blogs');
// add a nav menu
$menu_id = $I->haveTermInDatabase('Menu 1', 'nav_menu', ['slug' => 'menu1']);
// set theme options to use the `primary` location
$I->haveOptionInDatabase('theme_mods__blogs', ['nav_menu_locations' => ['primary' => $menu_id]]);
// add one element to the menu
$menu_item_id = $I->havePostInDatabase(['post_title' => 'theAverageDev', 'menu_order' => 1, 'post_type' => 'nav_menu_item']);
$meta = ['_menu_item_type' => 'custom', '_menu_item_object_id' => $menu_item_id, '_menu_item_object' => 'custom', '_menu_item_url' => 'http://theaveragedev.com'];
foreach ($meta as $key => $value) {
    $I->havePostmetaInDatabase($menu_item_id, $key, $value);
}
$I->amOnPage('/');
$I->seeElement('div#site-header-menu > nav.main-navigation');
$I->seeElement('div#site-header-menu > nav.main-header');
开发者ID:lucatume,项目名称:_blogs,代码行数:21,代码来源:MainHeaderCept.php


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