當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WebGuy::click方法代碼示例

本文整理匯總了PHP中WebGuy::click方法的典型用法代碼示例。如果您正苦於以下問題:PHP WebGuy::click方法的具體用法?PHP WebGuy::click怎麽用?PHP WebGuy::click使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WebGuy的用法示例。


在下文中一共展示了WebGuy::click方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: 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');
 }
開發者ID:jkaan,項目名稱:Time-Registration,代碼行數:17,代碼來源:SLCCest.php

示例2: _createEmptyModule

 public function _createEmptyModule(WebGuy $I)
 {
     $I->canSee('Create empty root element');
     $I->wait(2);
     $I->click('.typeaheadName');
     $I->waitForElement('.typeahead');
     $I->click('interfaces');
     $I->click('.typeaheadNS');
     $I->expectTo('see only one available NS');
     $I->seeNumberOfElements('.typeaheadNS + .typeahead a', 1);
     $I->click('urn:ietf:params:xml:ns:yang:ietf-interfaces');
     $I->click('Create');
     $I->waitForText('interfaces');
 }
開發者ID:Barathi07,項目名稱:Netopeer-GUI,代碼行數:14,代碼來源:DatastoreConfigureCest.php

示例3: _addInterface

 public function _addInterface(WebGuy $I)
 {
     $I->waitForText('interfaces', 10);
     $I->click('.create-child[rel="--*?1!"]');
     CommonScenarios::waitAndClickInTypeahead($I, 'interface');
     $I->fillField('.generatedForm input.value[name*="--*?1!--*?1!--*?1!"]', 'test-name' . time());
     $I->selectOption('.generatedForm select[name*="--*?1!--*?1!--*?2!"]', 'ianaift:other');
     $I->click('.create-child', '.generatedForm');
     CommonScenarios::waitAndClickInTypeahead($I, 'description');
     $I->fillField('input.value[name*="--*?1!--*?1!--*?3!"]', 'loopback interface');
 }
開發者ID:Barathi07,項目名稱:Netopeer-GUI,代碼行數:11,代碼來源:InterfacesConfigureCest.php

示例4: _turingAddTransition

 public function _turingAddTransition(WebGuy $I, $addDelta = false, $state = 0)
 {
     $I->wait(2);
     if ($addDelta === false) {
         $I->click('.create-child');
         $I->waitForText('transition-function');
         $I->click('transition-function');
         $I->wait(2);
         $I->click('.create-child[rel*="--*?1!--*?1!"]', '.generatedForm');
         $prefix = '--*?1!';
     } else {
         $I->click('.create-child[rel*="--*--*?1!"]');
         $prefix = '--*';
     }
     CommonScenarios::waitAndClickInTypeahead($I, 'delta');
     $I->fillField('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?1!"]', 'test-name' . time());
     // add input subtree
     $I->click('.create-child[rel*="' . $prefix . '--*?1!--*?1!"]', '.generatedForm');
     CommonScenarios::waitAndClickInTypeahead($I, 'input');
     $I->waitForElement('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?2!--*?1!"]');
     $I->fillField('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?2!--*?1!"]', $state);
     $I->fillField('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?2!--*?2!"]', '1');
     // add output subtree
     $I->click('.create-child[rel*="' . $prefix . '--*?1!--*?1!"]', '.generatedForm');
     CommonScenarios::waitAndClickInTypeahead($I, 'output');
     $I->click('.create-child[rel*="' . $prefix . '--*?1!--*?1!--*?3!"]', '.generatedForm');
     CommonScenarios::waitAndClickInTypeahead($I, 'state');
     $I->waitForElement('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?3!--*?1!"]');
     $I->fillField('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?3!--*?1!"]', $state + 1);
     $I->click('.create-child[rel*="' . $prefix . '--*?1!--*?1!--*?3!"]', '.generatedForm');
     CommonScenarios::waitAndClickInTypeahead($I, 'symbol');
     $I->waitForElement('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?3!--*?2!"]');
     $I->fillField('.generatedForm input.value[name*="' . $prefix . '--*?1!--*?1!--*?3!--*?2!"]', '2');
     $I->click('.create-child[rel*="' . $prefix . '--*?1!--*?1!--*?3!"]', '.generatedForm');
     CommonScenarios::waitAndClickInTypeahead($I, 'head-move');
     $I->waitForElement('.generatedForm select[name*="' . $prefix . '--*?1!--*?1!--*?3!--*?3!"]');
     $I->selectOption('.generatedForm select[name*="' . $prefix . '--*?1!--*?1!--*?3!--*?3!"]', 'right');
 }
開發者ID:Barathi07,項目名稱:Netopeer-GUI,代碼行數:38,代碼來源: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: 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

示例7: WebGuy

<?php

$I = new WebGuy($scenario);
/* Vendor login with wrong password fails */
$I->amOnPage('/signin');
$I->fillField('email', 'vendor1@example.com');
$I->fillField('password', 'wrongpassword');
$I->click('button.btn');
$I->see('Login incorrect', '.alert');
$I = new WebGuy($scenario);
/* Vendor login succeeds */
$I->fillField('email', 'vendor1@example.com');
$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', 'officer1@example.gov');
$I->fillField('password', 'wrongpassword');
$I->click('button.btn');
$I->see('Login incorrect', '.alert');
/* Then officer login works */
$I->fillField('email', 'officer1@example.gov');
$I->fillField('password', 'password');
$I->click('button.btn');
$I->see('My Projects', 'h4');
開發者ID:ajb,項目名稱:rfpez,代碼行數:29,代碼來源:LoginCept.php

示例8: array

$I->see('Hello guest');
// add user to the database
$I->haveInDatabase('account_user', array('username' => 'demo-activate', 'password' => '$2a$13$.m7wlozeIJuRtKp01lR4peYybArVLdO6Pf1JsPSnX6eISL9GXDWBu', 'first_name' => 'demo-activate', 'last_name' => 'demo-activate', 'email' => 'demo-activate@mailinator.com', 'activated' => 0));
// add a token to the database
$I->haveInDatabase('token', array('token' => '$2a$13$lRkdb6kwbIC9aGTkdei2h.NQNlZht9Bpdo2J0PqsJ3tHAFsYJNg7C', 'model_name' => 'AccountActivate', 'model_id' => 2, 'uses_allowed' => 1, 'uses_remaining' => 1, 'expires' => strtotime('+1day'), 'created' => time()));
// check with invalid token
$I->amOnPage('/account/account/activate/user_id/2/token/test-invalid-token');
$I->see('Invalid token.');
// reset password with empty details
$I->amOnPage('/account/account/activate/user_id/2/token/test-token');
$I->see('Your account has been activated and you have been logged in.');
// check login
$I->amOnPage('/');
$I->see('Hello demo-activate');
// logout
$I->amOnPage('/account/account/logout');
$I->see('Your have been logged out.');
// ensure token is expired
$I->amOnPage('/account/account/activate/user_id/2/token/test-token');
$I->see('Invalid token.');
// check login
$I->amOnPage('/account/account/login');
$I->fillField('AccountLogin_username', 'demo-activate');
$I->fillField('AccountLogin_password', 'demo-activate');
$I->click('Login');
$I->see('You have successfully logged in.');
$I->amOnPage('/');
$I->see('Hello demo-activate');
// logout
$I->amOnPage('/account/account/logout');
$I->see('Your have been logged out.');
開發者ID:cornernote,項目名稱:yii-account-module,代碼行數:31,代碼來源:AccountAccountControllerActivateCept.php

示例9: WebGuy

<?php

$I = new WebGuy($scenario);
$I->wantTo('create and edit Pages as pagewriter user');
$I->loginAs($users['pagewriter']);
$I->see('New Page');
$I->click('New Page');
$I->see('Actions for this Page');
$I->fillField('title', 'A page I made');
$I->fillField('teaser', 'Woop woop woop! Crazy nice stuff inside!');
$I->fillField('body', 'Take it, take it! I have three more of these!');
$I->click('Save Page');
$I->see('A page I made');
$I->see('Woop woop woop');
開發者ID:ArdKuijpers,項目名稱:bolt,代碼行數:14,代碼來源:010-pagesEditorCanEditPagesCept.php

示例10: WebGuy

 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-account-module
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-account-module/master/LICENSE
 *
 * @package yii-account-module
 */
$I = new WebGuy($scenario);
$I->wantTo('ensure AccountAccountController update works');
// check we are not logged in
$I->amOnPage('/');
$I->see('Hello guest');
// login
$I->amOnPage('/account/account/login');
$I->fillField('AccountLogin_username', 'admin');
$I->fillField('AccountLogin_password', 'admin');
$I->click('Login');
$I->see('You have successfully logged in.');
// update details with empty fields
$I->amOnPage('/account/account/update');
$I->fillField('AccountUpdate_first_name', '');
$I->fillField('AccountUpdate_last_name', '');
$I->fillField('AccountUpdate_email', '');
$I->fillField('AccountUpdate_username', '');
$I->click('Save');
$I->see('Please fix the following input errors:');
$I->see('Email cannot be blank.');
$I->see('Username cannot be blank.');
$I->see('First Name cannot be blank.');
// update details with invalid email
$I->amOnPage('/account/account/update');
$I->fillField('AccountUpdate_first_name', 'admin-first-name');
開發者ID:cornernote,項目名稱:yii-account-module,代碼行數:31,代碼來源:AccountAccountControllerUpdateCept.php

示例11: array

<?php

$foobar = array('username' => 'foobar', 'password' => 'foobar123');
$I = new WebGuy($scenario);
$I->wantTo('Create a user');
$I->loginAs($users['admin']);
$I->click('Users');
$I->click('New user');
$I->see("Create a new user");
$I->fillField('form[username]', $foobar['username']);
$I->fillField('form[password]', $foobar['password']);
$I->fillField('form[password_confirmation]', $foobar['password']);
$I->fillField('form[email]', 'foobar@example.org');
$I->fillField('form[displayname]', 'Foo Bar');
$I->click('input[type=submit]');
$I->see("has been saved");
$I->click('Logout');
$I->loginAs($foobar);
$I->see('Dashboard');
開發者ID:ArdKuijpers,項目名稱:bolt,代碼行數:19,代碼來源:510-createUserAsAdminCept.php

示例12: 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

示例13: WebGuy

<?php

$I = new WebGuy($scenario);
include 'loginCept.php';
$I->wantTo('Logout');
$I->click(LoginPopUp::$imgAvatar);
$I->click(LoginPopUp::$logoutButton);
開發者ID:unlimUA,項目名稱:Codeception,代碼行數:7,代碼來源:logoutCept.php

示例14: WebGuy

<?php

$I = new WebGuy($scenario);
$I->wantTo('install component/module/plugin');
// Direct install URL call
$I->amOnPage('/administrator/index.php?option=com_installer');
// Login first
$I->fillField("#mod-login-username", 'TestAdmin');
$I->fillField("#mod-login-password", 'PassAdmin');
$I->click('Log in');
// Where i want to be
$I->see('Extension Manager: Install');
// Move "directory tab" into foreground
$I->seeLink('Install from Directory');
$I->click('Install from Directory');
// -> find input button (Can be found twice)
// <div id="directory"
//     <fieldset class="uploadform">
//         <div class="form-actions">
//             <input class="btn btn-primary" type="button" onclick="Joomla.submitbutton3()" value="Install">
$I->seeElement('#directory > fieldset > div > input');
$I->click('#directory > fieldset > div > input');
$I->see('was successful');
開發者ID:RSGallery2,項目名稱:RoboLiTasks,代碼行數:23,代碼來源:InstallProjectWithTmpFolderCept.php

示例15: WebGuy

$I = new WebGuy($scenario);
$WP = new wordpress_controller($I);
$I->wantTo('Test the Authentication Plugin');
$WP->admin_login('admin', 'password');
$I->resizeWindow(1280, 1024);
$I->see('Dashboard');
$WP->enable_plugins($plugins);
$WP->logout();
foreach ($affiliates as $a) {
    $I->amGoingTo('Input settings for the base plugin');
    $WP->admin_login();
    $I->amOnPage($plugins['base']['admin_page']);
    // Fill out the form
    $I->fillField('agora_core_framework_config[prod_token]', $mw_settings[$a]['prod_token']);
    $I->fillField('agora_core_framework_config[uat_token]', $mw_settings[$a]['uat_token']);
    $I->click('Save');
    $I->amGoingTo('Configure some Authcodes');
    $I->amOnPage($plugins['auth']['admin_page']);
    $I->see('Add new Authentication Code');
    foreach ($pubcodes[$a] as $authcode) {
        $I->fillField('#add_new_authcode .authcode_name', $authcode['name']);
        $I->fillField('#add_new_authcode .authcode_advantage_code', $authcode['advantage_code']);
        $I->fillField('#add_new_authcode .authcode_description', $authcode['description']);
        $I->selectOption('#add_new_authcode .authcode_type', $authcode['auth_type']);
        $I->click('Add New', '#add_new_authcode');
        $I->waitForJS('return jQuery.active == 0', 5);
        $I->see($authcode['description']);
    }
    $I->amGoingTo('Insert some Test Content');
    foreach ($pubcodes[$a] as $authcode) {
        $I->amOnPage('/wp-admin/post-new.php');
開發者ID:gargallo,項目名稱:tfs-test,代碼行數:31,代碼來源:AuthPluginCept.php


注:本文中的WebGuy::click方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。