本文整理汇总了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');
}
示例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');
}
示例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);
}
示例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);
}
示例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');
}
示例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)');
}
示例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');
示例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');
示例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');
示例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');
示例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);
示例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.');
示例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');
示例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');
示例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.');