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


PHP WebGuy::wantTo方法代码示例

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


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

示例1: testGoogleSearchResults

 /**
  * Executes a search on Google's home page using return key.
  *
  * @covers SauceExtension
  */
 public function testGoogleSearchResults()
 {
     $this->webGuy->am('Anonymous User');
     $this->webGuy->wantTo('execute search on home page');
     $this->webGuy->amOnPage('/');
     $this->webGuy->canSeeInTitle('Google');
     $this->webGuy->fillField('#gbqfq', 'dogecoin');
     $this->webGuy->pressKey('#gbqfq', WebDriverKeys::ENTER);
     $this->webGuy->canSeeInField('input#gbqfq', 'dogecoin');
     $this->webGuy->canSeeInTitle('dogecoin - Google Search');
 }
开发者ID:psychomieze,项目名称:sauceextension,代码行数:16,代码来源:GoogleTest.php

示例2: backendLogin

 /**
  * Test is home available
  *
  * @param AcceptanceTester $I
  */
 public function backendLogin(AcceptanceTester $I)
 {
     $I = new WebGuy($scenario);
     $I->wantTo('see GitHub word in title ');
     $I->amOnPage('/');
     $I->seeInTitle('GitHub');
 }
开发者ID:RSGallery2,项目名称:RoboLiTasks,代码行数:12,代码来源:SeleniumTest.php

示例3: testEditConfigWithCommit

 public function testEditConfigWithCommit(WebGuy $I)
 {
     $I->wantTo('create new interface using commit all');
     $this->_addInterface($I);
     $I->click('Append changes');
     $I->seeNumberOfElements('form.addedForm', 1);
     $I->click('Commit all changes');
     // see result
     CommonScenarios::checkNumberOfFlashes($I, 1);
     $I->seeNumberOfElements('.level-0.interface', 3);
 }
开发者ID:Barathi07,项目名称:Netopeer-GUI,代码行数:11,代码来源:InterfacesConfigureCest.php

示例4: testEditConfigWithCommit

 public function testEditConfigWithCommit(WebGuy $I)
 {
     $I->wantTo('create new transition function using commit all');
     $this->_turingAddTransition($I, true, 2);
     $I->click('Append changes');
     $I->seeNumberOfElements('form.addedForm', 1);
     $I->click('Commit all changes');
     $I->waitForElementNotVisible('#ajax-spinner');
     $I->wait(2);
     // see result
     CommonScenarios::checkNumberOfFlashes($I, 1);
     $I->canSeeNumberOfElements('.level-1.delta', 2);
 }
开发者ID:Barathi07,项目名称:Netopeer-GUI,代码行数:13,代码来源:TuringConfigureCest.php

示例5: testEditConfig

 public function testEditConfig(WebGuy $I)
 {
     $I->wantTo('create new interface using submit button');
     $inputValue = 'test-name' . time();
     $I->click('.create-child[rel="--*--*?3!"]');
     CommonScenarios::waitAndClickInTypeahead($I, 'group');
     $I->waitForElement('input.value[name*="--*--*?3!--*?1!--*?1!"]');
     $I->fillField('input.value[name*="--*--*?3!--*?1!--*?1!"]', $inputValue);
     $I->click('Create new node');
     $I->waitForElementNotVisible('#ajax-spinner');
     $I->wait(2);
     //		$I->canSee($inputValue);
     CommonScenarios::checkNumberOfFlashes($I, 1);
     $I->canSee('group');
 }
开发者ID:Barathi07,项目名称:Netopeer-GUI,代码行数:15,代码来源:NacmConfigureCest.php

示例6: testUserSignup

 /**
  * 
  * @param \WebGuy $I
  * @param \Codeception\Scenario $scenario
  */
 public function testUserSignup($I, $scenario)
 {
     $I->wantTo('ensure that signup works');
     $signupPage = SignupPage::openBy($I);
     $I->see('Please fill out the following fields to signup:');
     $I->amGoingTo('submit signup form with no data');
     $signupPage->submit([]);
     $I->expectTo('see validation errors');
     $I->see('Username cannot be blank.');
     $I->see('Email cannot be blank.');
     $I->see('Password cannot be blank.');
     $I->amGoingTo('submit signup form with not correct email');
     $signupPage->submit(['username' => 'tester', 'email' => 'tester.email', 'password' => 'tester_password']);
     $I->expectTo('see that email adress is wrong');
     $I->dontSee('Username cannot be blank.', '.help-inline');
     $I->dontSee('Password cannot be blank.', '.help-inline');
     $I->see('Email is not a valid email address.', '.help-block');
     $I->amGoingTo('submit signup form with correct email');
     $signupPage->submit(['username' => 'tester', 'email' => 'tester.email@example.com', 'password' => 'tester_password']);
     $I->expectTo('see that user logged in');
     $I->see('Logout (tester)');
 }
开发者ID:jackycgq,项目名称:advanced-1,代码行数:27,代码来源:SignupCest.php

示例7: WebGuy

<?php

$I = new WebGuy($scenario);
$I->wantTo('call friends to try multi session');
$I->amOnPage('/info');
$jon = $I->haveFriend('jon');
$jon->does(function (WebGuy $I) {
    $I->amOnPage('/');
    $I->seeInCurrentUrl('/');
});
$I->seeInCurrentUrl('/info');
开发者ID:hitechdk,项目名称:Codeception,代码行数:11,代码来源:FriendsCept.php

示例8: WebGuy

<?php

use common\tests\_pages\LoginPage;
$I = new WebGuy($scenario);
$I->wantTo('ensure login page works');
$loginPage = LoginPage::openBy($I);
$I->amGoingTo('submit login form with no data');
$loginPage->login('', '');
$I->expectTo('see validations errors');
$I->see('Username cannot be blank.');
$I->see('Password cannot be blank.');
$I->amGoingTo('try to login with wrong credentials');
$I->expectTo('see validations errors');
$loginPage->login('admin', 'wrong');
$I->expectTo('see validations errors');
$I->see('Incorrect username or password.');
$I->amGoingTo('try to login with correct credentials');
$loginPage->login('erau', 'password_0');
$I->expectTo('see that user is logged');
$I->see('Logout (erau)');
$I->dontSee('Login');
$I->dontSee('Signup');
$I->click('Logout (erau)');
$I->dontSee('Logout (erau)');
$I->see('Login');
开发者ID:jackycgq,项目名称:advanced-1,代码行数:25,代码来源:LoginCept.php

示例9: WebGuy

<?php

/**
 * DefaultController Test
 *
 * @var $scenario \Codeception\Scenario
 *
 * @author Brett O'Donnell <cornernote@gmail.com>
 * @author Zain Ul abidin <zainengineer@gmail.com>
 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-email-module
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-email-module/master/LICENSE
 *
 * @package yii-email-module
 */
$I = new WebGuy($scenario);
$I->wantTo('ensure DefaultController works');
$I->amOnPage('email');
$I->see('You may use the following tools');
$I->click('Spool');
$I->see('Spools');
$I->click('Template');
$I->see('Templates');
$I->click('Email');
$I->see('You may use the following tools');
开发者ID:Khan143,项目名称:yii-email-module,代码行数:25,代码来源:DefaultControllerCept.php

示例10: WebGuy

<?php

$I = new WebGuy($scenario);
$I->wantTo('base check rsg2-latest-images for picture ');
// Direct call
//$I->amOnPage('http://127.0.0.1/Joomla3x/index.php/rsg2-image-wall');
$I->amOnPage('/index.php/rsg2-image-wall');
$I->makeScreenshot('base-rsg2-image-wall');
// Where i want to be
$I->see('RSG2 image wall');
开发者ID:RSGallery2,项目名称:RoboLiTasks,代码行数:10,代码来源:BaseViewImageWallCept.php

示例11: WebGuy

<?php

/**
* Testing /clients/create form
* For now do not tests all fields in Form.
**/
$I = new WebGuy($scenario);
$I->wantTo('Test Form:New Client. /clients/create');
$I->amOnPage('/');
$I->click('#startButton');
$I->amOnPage('/clients/create');
$I->click('Add contact');
$I->fillField('input#email0', 'SomeTestEmalThatWillBeDeleted@mail.com');
$I->fillField('input#email1', 'some.test.email@gmail.com');
$I->click('Remove contact');
$I->click('Add contact');
$I->fillField('input#email1', 'AZXC123Q.test2009test@yandex2.com');
$I->seeInField('input#email0', 'some.test.email@gmail.com');
$I->seeInField('input#email1', 'AZXC123Q.test2009test@yandex2.com');
//-----------Fields done-----
//add more fields
$I->fillField('input#name', 'Some User');
$I->fillField('input#website', 'http://google.com');
$I->fillField('input#work_phone', '+308123456789');
$I->fillField('input#address1', 'Test Address 1');
$I->fillField('input#address2', 'Test Address 2 APPTMT SUITE');
$I->fillField('input#city', 'Zaporozhe');
$I->fillField('input#state', 'Test Province');
$I->fillField('input#postal_code', 'postcode 123455677');
$option = 'Net 7';
$I->selectOption("#payment_terms", $option);
开发者ID:poseidonjm,项目名称:invoice-ninja,代码行数:31,代码来源:CheckCreateNewClientFormCept.php

示例12: WebGuy

<?php

$I = new WebGuy($scenario);
$I->wantTo('ensure that home page works');
$I->amOnPage(Yii::$app->homeUrl);
$I->see('My Company');
$I->seeLink('About');
$I->click('About');
$I->see('This is the About page.');
开发者ID:rocketyang,项目名称:dcms2,代码行数:9,代码来源:HomeCept.php

示例13: WebGuy

<?php

$I = new WebGuy($scenario);
$I->wantTo('Ensure study year pages work');
$I->amOnPage('/leerjaar/1');
$I->see('LEERJAAR 1');
$I->amOnPage('/leerjaar/2');
$I->see('LEERJAAR 2');
$I->amOnPage('/leerjaar/3');
$I->see('LEERJAAR 3');
$I->amOnPage('/leerjaar/4');
$I->see('LEERJAAR 4');
开发者ID:jkaan,项目名称:Prince2-App,代码行数:12,代码来源:StudyYearCept.php

示例14: WebGuy

<?php

$I = new WebGuy($scenario);
$I->wantTo('Ensure the subject page work');
$I->amOnPage('/leerjaar/1/onderwerp/3');
$I->see('PLAATJES');
$I->see('Categorie: Plaatjes');
$I->see('Test Plaatje 3');
$I->see('Test Plaatje 4');
开发者ID:jkaan,项目名称:Prince2-App,代码行数:9,代码来源:SubjectPageCept.php

示例15: WebGuy

<?php

$I = new WebGuy($scenario);
$I->wantTo('ensure that contact works');
$I->amOnPage('?r=site/contact');
$I->see('Contact', 'h1');
$I->submitForm('#contact-form', []);
$I->see('Contact', 'h1');
$I->see('Name cannot be blank');
$I->see('Email cannot be blank');
$I->see('Subject cannot be blank');
$I->see('Body cannot be blank');
$I->see('The verification code is incorrect');
$I->submitForm('#contact-form', ['ContactForm[name]' => 'tester', 'ContactForm[email]' => 'tester.email', 'ContactForm[subject]' => 'test subject', 'ContactForm[body]' => 'test content', 'ContactForm[verifyCode]' => 'testme']);
$I->dontSee('Name cannot be blank', '.help-inline');
$I->see('Email is not a valid email address.');
$I->dontSee('Subject cannot be blank', '.help-inline');
$I->dontSee('Body cannot be blank', '.help-inline');
$I->dontSee('The verification code is incorrect', '.help-inline');
$I->submitForm('#contact-form', ['ContactForm[name]' => 'tester', 'ContactForm[email]' => 'tester@example.com', 'ContactForm[subject]' => 'test subject', 'ContactForm[body]' => 'test content', 'ContactForm[verifyCode]' => 'testme']);
$I->dontSeeElement('#contact-form');
$I->see('Thank you for contacting us. We will respond to you as soon as possible.');
开发者ID:pathman,项目名称:yii-basic,代码行数:22,代码来源:ContactCept.php


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