本文整理汇总了PHP中AcceptanceTester::makeScreenshot方法的典型用法代码示例。如果您正苦于以下问题:PHP AcceptanceTester::makeScreenshot方法的具体用法?PHP AcceptanceTester::makeScreenshot怎么用?PHP AcceptanceTester::makeScreenshot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcceptanceTester
的用法示例。
在下文中一共展示了AcceptanceTester::makeScreenshot方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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');
}
示例2: AcceptanceTester
<?php
// @group mandatory
$I = new AcceptanceTester($scenario);
$I->wantTo('ensure that JavaScript works');
$I->amGoingTo('check javascript with a modal');
$I->amOnPage('/en-us');
$I->dontSee('#infoModal');
$I->click('footer .pull-left a');
$I->waitForElementVisible('#infoModal', 3);
$I->seeElement('#infoModal');
$I->makeScreenshot('modal');
$I->click('#infoModal .close');
$I->dontSee('#infoModal');
示例3: AcceptanceTester
<?php
/**
* @link http://www.diemeisterei.de/
* @copyright Copyright (c) 2015 diemeisterei GmbH, Stuttgart
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$I = new AcceptanceTester($scenario);
$I->wantTo('ensure that responsive mobile layout works');
$I->resizeWindow(320, 568);
$I->amOnPage('/');
$I->makeScreenshot('mobile');
$I->click('button.navbar-toggle');
$I->wait(3);
$I->seeElement('li.active');
$I->seeLink('Login');
$I->makeScreenshot('mobile-open-menu');
示例4:
$I->am('student');
$I->wantTo('make sure the hall of fame page displays correctly');
// Navigate to page and confirm things look right
$I->amOnPage('/student/hall_of_fame/display_records');
// $I->seeInTitle('Scholar Hall of Fame');
/*$I->seeElement(['xpath' => "//input[@value = 'Important!']"]);*/
$I->seeElement(['xpath' => "//input[@value = 'Your Classroom']"]);
$I->seeElement(['xpath' => "//input[@value = 'Your Teacher']"]);
$I->seeElement(['xpath' => "//input[@value = 'Your School']"]);
$I->seeElement(['xpath' => "//input[@value = 'Your District']"]);
$I->seeElement(['xpath' => "//input[@value = 'Your State']"]);
$I->seeElement(['xpath' => "//input[@value = 'Your Country']"]);
/*$I->seeElement(['xpath' => "//input[@value = 'Millionaire\'s Club']"]);*/
$I->seeElement(['xpath' => "//input[@value = 'Overall']"]);
$I->seeElement(['xpath' => "//input[@value = 'Return to Village']"]);
$I->makeScreenshot('siHall_of_fame');
// Check a category and return back to the main screen
$I->click("//input[@value = 'Your Classroom']");
$I->makeScreenshot('sjHof_classroom');
$I->click('//input[@value = "Back to Categories"]');
/*$I->click("//input[@value = 'Your Teacher']");
$I->makeScreenshot('hof_teacher');
$I->click('//input[@value = "Back to Categories"]');
$I->click("//input[@value = 'Your School']");
$I->makeScreenshot('hof_school');
$I->click('//input[@value = "Back to Categories"]');
$I->click("//input[@value = 'Your District']");
$I->makeScreenshot('hof_district');
$I->click('//input[@value = "Back to Categories"]');
示例5: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->am('student');
$I->wantTo('test the options on the top bar');
$I->loadSessionSnapshot('login');
$I->amOnPage('/student/library');
$I->click(['xpath' => "//li[@id='achievements']"]);
$I->makeScreenshot('srAchievements');
$I->click(['xpath' => "//*[@id='fancybox-close']"]);
$I->wait(3);
$I->click(['xpath' => "//*[@id='share-idea']"]);
$I->makeScreenshot('ssShare_idea');
$I->click(['xpath' => "//*[@id='fancybox-close']"]);
$I->click(['xpath' => "//*[@id='report-bug']"]);
$I->makeScreenshot('stReport_bug');
?>
示例6: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->am('student');
$I->wantTo('check books, videos, and magazines');
$I->loadSessionSnapshot('login');
$I->selectOption(['xpath' => "//select[@id='current_module']"], 'Rising Reader');
// check the first book
$I->amOnPage('/student/library/bookshelf');
$I->makeScreenshot('rcBookshelf');
$I->click(['xpath' => "//span[@id='71']"]);
$I->makeScreenshot('rdBook');
$I->click(['xpath' => "//input[@id='bookshelf']"]);
// check the first video
$I->amOnPage('/student/video/categories');
$I->makeScreenshot('reVideos');
$I->click(['xpath' => "//div[@id='86']"]);
$I->click(['xpath' => "//div[@id='1779']"]);
$I->seeElementInDOM(['xpath' => "//*[@id='mediaplayer-1']"]);
$I->makeScreenshot('rfVideo');
// check the first magazine
$I->amOnPage('/student/magazine/categories');
$I->makeScreenshot('rgMagezine_rack');
$I->click(['xpath' => "//span[@id='79']"]);
$I->click(['xpath' => "//div[@id='1750']"]);
$I->seeElementInDOM(['xpath' => "//*[@id='magazine-article']"]);
$I->makeScreenshot('rhMagezine');
示例7: AcceptanceTester
<?php
use schmunk42\giiant\tests\_pages\LoginPage;
#new schmunk42\giiant\tests\_pages\LoginPage;
$I = new AcceptanceTester($scenario);
$I->wantTo('ensure that crud works with access rules');
$I->amOnPage('/crud/actor');
$I->dontSee('Actor', 'h2');
$I->makeScreenshot('crud-actor-login');
$I->see('Sign in', 'h3');
$I->amGoingTo('try to login with correct credentials');
// TODO: use LoginPage
$username = 'admin';
$password = 'admin';
$I->fillField('input[name="login-form[login]"]', $username);
$I->fillField('input[name="login-form[password]"]', $password);
$I->click('Sign in');
$I->waitForElement('#link-logout', 5);
#LoginPage::openBy($I);
#$loginPage = LoginPage::openBy($I);
#$loginPage->login('admin', 'admin');
$I->see('Actor', 'h2');
$I->makeScreenshot('crud-actor');
示例8: AcceptanceTester
<?php
// @group optional
use dmstr\modules\pages\tests\_pages\LoginPage;
$I = new AcceptanceTester($scenario);
$I->wantTo('ensure that Pages works');
$I->expect('no access with guest user');
$I->amOnPage('/pages');
$I->see('Sign in', 'h3');
$I->makeScreenshot('pages-login');
$I->amGoingTo('try to login with correct credentials');
$loginPage = LoginPage::openBy($I);
$I->see('Sign in', 'h3');
$loginPage->login('admin', 'admin');
$I->dontSee('Sign in', 'h3');
$I->makeScreenshot('pages-after-login');
$I->amGoingTo('try to view and create pages');
$I->amOnPage('/pages');
$I->see('Pages', 'h1');
$I->makeScreenshot('success-pages-index');
示例9: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('test the settings page');
$I->loadSessionSnapshot('login');
$I->amOnPage('/student/library');
$I->click(['xpath' => "//li[@id='settings']"]);
$I->makeScreenshot('ruSettings');
示例10: AcceptanceTester
<?php
/**
* Acceptance test for the Readorium Quiz Bowl screen.
*
* @author Andrew Lee
*/
$I = new AcceptanceTester($scenario);
// Set up
$I->loadSessionSnapshot('login');
$I->am('student');
$I->wantTo('make sure the quiz bowl screen displays correctly');
// Navigate to page and confirm things look right
$I->amOnPage('/student/quiz_bowl');
$I->seeInTitle('Rising Reader Quiz Bowl');
$I->seeElement("//input[@value = 'Rising Reader Page I']");
$I->makeScreenshot('rmQuiz_bowl');
// Open page 1 and make it looks right
$I->click(['xpath' => "//input[@value = 'Rising Reader Page I']"]);
$I->makeScreenshot('rnQb_page1');
// Back to Categories and check page 2
$I->click(['xpath' => "//input[@value = 'Back to Categories']"]);
$I->click(['xpath' => "//input[@value = 'Rising Reader Page II']"]);
$I->makeScreenshot('roQb_page2');
// Press the back button to return to the village
$I->click(['xpath' => "//input[@value = 'Back']"]);
$I->seeInCurrentURL('/student/village');
示例11: AcceptanceTester
<?php
// @group onlyCrud
use tests\_pages\LoginPage;
$I = new AcceptanceTester($scenario);
$I->wantTo('ensure that crudOnly works (no access rules)');
$I->amOnPage('/onlyCrud/country');
$I->see('Countries', 'h1');
$I->makeScreenshot('crud-country');
$I->expectTo('see view, edit and delete button');
$I->seeElementInDOM('[data-key="1"] .glyphicon-file');
$I->seeElementInDOM('[data-key="2"] .glyphicon-pencil');
$I->seeElementInDOM('[data-key="3"] .glyphicon-trash');
$I->amGoingTo('create a Country');
$I->click('New');
$I->see('Country', 'h1');
$I->see('Create', '.btn');
$I->fillField('#country-country', 'Xyzland');
$I->makeScreenshot('crud-pre-create-country');
$I->click('Create');
$I->wait(1);
$I->see('Xyzland', 'table');
$I->see('Country', 'table');
$I->makeScreenshot('crud-create-country');
$I->click('Edit');
$I->wait(1);
$I->seeInField('#country-country', 'Xyzland');
$I->see('Country', 'h1');
$I->fillField('#country-country', 'Abcstan');
$I->click('Save');
$I->wait(1);
示例12: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('sign in');
$I->amOnPage('/user/login');
$I->fillField('#login-form-login', 'admin');
$I->fillField('#login-form-password', 'admin');
$I->click('Sign in', '#login-form');
$I->wait(5);
$I->see('admin', '#link-user-menu');
$I->makeScreenshot('login-success');
示例13: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('ensure that frontpage works');
$I->amOnPage('/');
$I->makeScreenshot('front_page');
$I->see('Home');
示例14: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->am('student');
$I->wantTo('ensure that frontpage works');
$I->amOnPage('/');
$I->makeScreenshot('aLogin');
//Testing all the text fields
$I->seeInTitle('Readorium Student Login');
$I->seeLink('username');
$I->seeLink('password');
//Fill fields
$I->fillField(['xpath' => "//input[@name='userid']"], 'juth');
$I->fillField(['xpath' => "//input[@name='password']"], 'r3aD0riUm');
$I->fillField(['xpath' => "//input[@name='classroomid']"], '1');
$I->click('Login');
$I->makeScreenshot('bLibrary');
$I->saveSessionSnapshot('login');
示例15: AcceptanceTester
<?php
/**
* @link http://www.diemeisterei.de/
* @copyright Copyright (c) 2015 diemeisterei GmbH, Stuttgart
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$I = new AcceptanceTester($scenario);
$I->wantTo('ensure that language urls and redirects work');
$I->amOnPage('/');
$I->seeCurrentUrlEquals('/en/user/login');
$I->amOnPage('/de');
$I->seeCurrentUrlEquals('/de/user/login');
$I->see('Anmelden');
$I->makeScreenshot('language-de');
$I->amOnPage('/en-us');
$I->see('Not Found');