本文整理汇总了PHP中WebGuy类的典型用法代码示例。如果您正苦于以下问题:PHP WebGuy类的具体用法?PHP WebGuy怎么用?PHP WebGuy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WebGuy类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: 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
示例2: 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
示例3: 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
示例4: profielInzienStudent
/**
* Test for requirement 50 of student
* @param WebGuy $I [description]
* @return [type] [description]
*/
public function profielInzienStudent(\WebGuy $I)
{
$I->amOnPage('/login');
$I->see('Uren');
$I->fillField('Username', 'student');
$I->fillField('Password', 'student');
$I->click('Login');
$I->amOnPage('/student/1');
$I->see('Student Page');
$I->wantTo('Profiel Inzien');
$I->click('Profiel');
$I->amOnPage('/student/1/profiel');
$I->see('student');
$I->see('I12R');
}
开发者ID:jkaan,项目名称:Time-Registration,代码行数:20,代码来源:StudentCest.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' => '[email protected]', 'password' => 'tester_password']);
$I->expectTo('see that user logged in');
$I->see('Logout (tester)');
}
开发者ID:jackycgq,项目名称:advanced-1,代码行数:27,代码来源:SignupCest.php
示例7: seeVisualChangesAfterSizeChanges
/**
* Comparing a div, that change it's size
*/
public function seeVisualChangesAfterSizeChanges(WebGuy $I, $scenario)
{
$I->amOnPage("/VisualCeption/notSameSize.php");
$I->seeVisualChanges("getRedDiv", "div");
$I->wait(1);
// the test has to be called twice for comparison on the travis server
$I->amOnPage("/VisualCeption/notSameSize.php");
$I->seeVisualChanges("getRedDiv", "div");
}
开发者ID:Kuzmenkovs,项目名称:codeception-module-visualception,代码行数:12,代码来源:NotSameSizeCest.php
示例8: dontSeeVisualChangesAndHideElement
public function dontSeeVisualChangesAndHideElement(WebGuy $I, $scenario)
{
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
$I->dontSeeVisualChanges("hideTheBlock", "body", "#theblock");
$I->wait(1);
// the test has to be called twice for comparison on the travis server
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
$I->dontSeeVisualChanges("hideTheBlock", "body", array("#theblock"));
}
开发者ID:Kuzmenkovs,项目名称:codeception-module-visualception,代码行数:9,代码来源:TimeComparisonCest.php
示例9: writeCurrentImageFile
/**
* fail the test. lookup is current image is written
*/
public function writeCurrentImageFile(WebGuy $I, $scenario)
{
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
$I->dontSeeVisualChanges("currentImageIdentifier", "#theblock");
$I->wait(2);
// the test has to be called twice for comparison on the travis server
// expect failing the test
$I->amOnPage("/VisualCeption/seeVisualChanges.php");
try {
$I->dontSeeVisualChanges("currentImageIdentifier", "#theblock");
} catch (ImageDeviationException $exception) {
$currentImagePath = $exception->getCurrentImage();
if (!is_file($exception->getCurrentImage())) {
throw new \PHPUnit_Framework_ExpectationFailedException("The screenshot was not saved successfully.");
}
}
}
开发者ID:Kuzmenkovs,项目名称:codeception-module-visualception,代码行数:20,代码来源:WriteCurrentImageCest.php
示例10: WebGuy
<?php
/*
* This file is part of the Webception package.
*
* (c) James Healey <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$I = new WebGuy($scenario);
$I->wantTo('check AJAX call when the Codeception log check fails.');
$I->sendGET('logs?test=log_fail');
$I->seeResponseContainsJson(array('ready' => false, 'error' => "The Codeception Log directory does not exist. Please check the following path exists:"));
开发者ID:24hours,项目名称:Webception,代码行数:14,代码来源:CheckAJAXWhenLogFailsCept.php
示例11: WebGuy
<?php
$I = new WebGuy($scenario);
include 'constant.php';
$I->wantTo('Register new user');
$I->amOnPage("/");
$I->see('Registration');
$I->see('Login');
$I->see('Genre');
$I->see('Stations');
$I->click(Registration::$registrationlink);
$I->waitForText('Sign Up');
$I->see('Sign Up');
$I->seeElement(Registration::$username);
$I->seeElement(Registration::$emailField);
$I->seeElement(Registration::$passwordField);
$I->seeElement(Registration::$confirmPasswordField);
$I->seeElement(Registration::$registrationButton);
$I->fillField(Registration::$username, $username);
$I->fillField(Registration::$emailField, $email);
$I->fillField(Registration::$passwordField, $pass);
$I->fillField(Registration::$confirmPasswordField, $pass_conf);
$I->click(Registration::$registrationButton);
开发者ID:unlimUA,项目名称:Codeception,代码行数:23,代码来源:registrationCept.php
示例12: WebGuy
<?php
/**
*
* @var $scenario \Codeception\Scenario
*
* @author Brett O'Donnell <[email protected]>
* @author Zain Ul abidin <[email protected]>
* @copyright 2013 Mr PHP
* @link https://github.com/cornernote/yii-audit-module
* @license BSD-3-Clause https://raw.github.com/cornernote/yii-audit-module/master/LICENSE
*
* @package yii-audit-module
*/
$I = new WebGuy($scenario);
$I->wantTo('ensure method call on non-object is caught');
$I->amOnPage('site/methodOnNonObject');
$I->see('PHP error');
$I->see('Fatal error: Call to a member function iAmNotAnObject() on a non-object');
$I->canSeeInDatabase('audit_error', array('code' => '500', 'type' => 'PHP error', 'message' => 'Fatal error: Call to a member function iAmNotAnObject() on a non-object'));
开发者ID:Horlacher,项目名称:yii-audit-module,代码行数:20,代码来源:AuditErrorHandlerMethodOnNonObjectCept.php
示例13: 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
示例14: WebGuy
<?php
$I = new WebGuy($scenario);
$I->wantTo('base check rsg2-thumb-scroller for picture ');
// Direct call
//$I->amOnPage('http://127.0.0.1/Joomla3x/index.php/rsg2-thumb-scroller');
$I->amOnPage('/index.php/rsg2-thumb-scroller');
$I->makeScreenshot('base-rsg2-thumb-scroller');
// Where i want to be
$I->see('RSG2 thumb scroller');
开发者ID:RSGallery2,项目名称:RoboLiTasks,代码行数:10,代码来源:BaseViewThumbScrollerCept.php
示例15: WebGuy
<?php
$I = new WebGuy($scenario);
$I->wantTo('Ensure the index page works');
$I->amOnPage('/');
$I->see('LEERJAAR 1');
$I->see('LEERJAAR 2');
$I->see('LEERJAAR 3');
$I->see('LEERJAAR 4');
$I->see('CONTACT');
$I->see('[email protected]');
开发者ID:jkaan,项目名称:Prince2-App,代码行数:11,代码来源:HomepageCept.php
示例16: WebGuy
<?php
$I = new WebGuy($scenario);
$I->wantTo("Ensure the search function works");
$I->amOnPage('/');
$I->submitForm('#searchform', array('search' => 'pl'));
$I->see('PLAATJES');
开发者ID:jkaan,项目名称:Prince2-App,代码行数:7,代码来源:SearchCept.php
示例17: WebGuy
<?php
use tests\_pages\ContactPage;
$I = new WebGuy($scenario);
$I->wantTo('ensure that contact works');
$contactPage = ContactPage::openBy($I);
$I->see('Contact', 'h1');
$I->amGoingTo('submit contact form with no data');
$contactPage->submit([]);
$I->expectTo('see validations errors');
$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->amGoingTo('submit contact form with not correct email');
$contactPage->submit(['name' => 'tester', 'email' => 'tester.email', 'subject' => 'test subject', 'body' => 'test content', 'verifyCode' => 'testme']);
$I->expectTo('see that email adress is wrong');
$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->amGoingTo('submit contact form with correct data');
$contactPage->submit(['name' => 'tester', 'email' => '[email protected]', 'subject' => 'test subject', 'body' => 'test content', 'verifyCode' => 'testme']);
if (method_exists($I, 'wait')) {
$I->wait(3);
// only for selenium
}
$I->dontSeeElement('#contact-form');
开发者ID:tqsq2005,项目名称:dotplant2,代码行数:31,代码来源:ContactCept.php
示例18: _after
public function _after(WebGuy $I)
{
$I->amOnPage('/logout');
}
开发者ID:Barathi07,项目名称:Netopeer-GUI,代码行数:4,代码来源:ConnectionsCest.php
示例19: WebGuy
<?php
$I = new WebGuy($scenario);
/* Vendor login with wrong password fails */
$I->amOnPage('/signin');
$I->fillField('email', '[email protected]');
$I->fillField('password', 'wrongpassword');
$I->click('button.btn');
$I->see('Login incorrect', '.alert');
$I = new WebGuy($scenario);
/* Vendor login succeeds */
$I->fillField('email', '[email protected]');
$I->fillField('password', 'password');
$I->click('button.btn');
$I->see('Projects', 'h4');
/* Signout works */
$I->click('Sign Out');
$I->see('RFP-EZ Marketplace');
/* Officer login wrong password fails */
$I->amOnPage('/signin');
$I->fillField('email', '[email protected]');
$I->fillField('password', 'wrongpassword');
$I->click('button.btn');
$I->see('Login incorrect', '.alert');
/* Then officer login works */
$I->fillField('email', '[email protected]');
$I->fillField('password', 'password');
$I->click('button.btn');
$I->see('My Projects', 'h4');
开发者ID:ajb,项目名称:rfpez,代码行数:29,代码来源:LoginCept.php
示例20: 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', '[email protected]');
$I->fillField('input#email1', '[email protected]');
$I->click('Remove contact');
$I->click('Add contact');
$I->fillField('input#email1', '[email protected]');
$I->seeInField('input#email0', '[email protected]');
$I->seeInField('input#email1', '[email protected]');
//-----------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
注:本文中的WebGuy类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论