本文整理汇总了PHP中WebGuy::amOnPage方法的典型用法代码示例。如果您正苦于以下问题:PHP WebGuy::amOnPage方法的具体用法?PHP WebGuy::amOnPage怎么用?PHP WebGuy::amOnPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebGuy
的用法示例。
在下文中一共展示了WebGuy::amOnPage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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");
}
示例2: 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"));
}
示例3: 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');
}
示例4: gebruikerKoppelenAanCursus
/**
* Test for requirement 130 of SLC
* @param WebGuy $I [description]
*/
public function gebruikerKoppelenAanCursus(\WebGuy $I)
{
$I->amOnPage('/login');
$I->see('Uren');
$I->fillField('Username', 'slc');
$I->fillField('Password', 'slc');
$I->click('Login');
$I->amOnPage('/slc/3');
$I->amOnPage('/slc/3/course/students/1');
$I->click('Voeg toe');
$I->amOnPage('/slc/3/course/students/1');
$I->see('student');
}
示例5: 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');
}
示例6: 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.");
}
}
}
示例7: 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');
}
示例8: 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);
示例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('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');
示例11: 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');
示例12: 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');
示例13: WebGuy
<?php
/**
* EmailSpoolController 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 SpoolController works');
$I->amOnPage('email/spool/index');
$I->see('Spools');
$I->see('Search');
示例14: 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);
示例15: WebGuy
<?php
/**
*
* @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-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 undefined function is caught');
$I->amOnPage('site/undefinedFunction');
$I->see('PHP error');
$I->see('Fatal error: Call to undefined function undefined_function()');
$I->canSeeInDatabase('audit_error', array('code' => '500', 'type' => 'PHP error', 'message' => 'Fatal error: Call to undefined function undefined_function()'));