本文整理汇总了PHP中WebGuy::submitForm方法的典型用法代码示例。如果您正苦于以下问题:PHP WebGuy::submitForm方法的具体用法?PHP WebGuy::submitForm怎么用?PHP WebGuy::submitForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebGuy
的用法示例。
在下文中一共展示了WebGuy::submitForm方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: urenInvullen
/**
* Test for requirement 10 of student
* @param WebGuy $I [description]
* @return [type] [description]
*/
public function urenInvullen(\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->amOnPage('/student/1/uren/add');
$I->submitForm('#ureninvullen', array('cursus' => 'SOP', 'onderdeel' => '1', 'date' => '19-01-2014', 'studielast', '1000'));
}
示例2: 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.');
示例3: WebGuy
<?php
$I = new WebGuy($scenario);
$I->wantTo("Ensure the search function works");
$I->amOnPage('/');
$I->submitForm('#searchform', array('search' => 'pl'));
$I->see('PLAATJES');
示例4: WebGuy
<?php
$I = new WebGuy($scenario);
$I->wantTo('ensure that login works');
$I->amOnPage('?r=site/login');
$I->see('Application', 'h1');
$I->submitForm('#login-form', array());
$I->dontSee('Logout (admin)');
$I->see('Username cannot be blank');
$I->see('Password cannot be blank');
$I->submitForm('#login-form', array('LoginForm[username]' => 'admin', 'LoginForm[password]' => 'wrong'));
$I->dontSee('Logout (admin)');
$I->see('Incorrect username or password');
$I->submitForm('#login-form', array('LoginForm[username]' => 'admin', 'LoginForm[password]' => 'admin'));
$I->see('Logout (admin)');
示例5: time
$I->fillField('vendor[address]', 'test');
$I->fillField('vendor[city]', 'test');
$I->fillField('vendor[zip]', '01234');
$I->click('Create Profile');
$I->see($email, 'a.dropdown-toggle');
$I->click('Bids');
$I->see('My Bids');
$I->click('Account Settings');
$I->see('My Account');
$I->click('Projects');
$I->see('Projects', 'h4');
$I->click('API for SBA.gov Dynamic Small Business Search');
$I->see('Bids due in', 'h5');
/* Ask a qusetion */
$question = 'This is my question ' . time();
$I->submitForm('#ask-question-form', array('project_id' => $I->grabValueFrom("input[name=project_id]"), 'question' => $question));
$I->moveBack();
$I->reloadPage();
$I->see($question, '.question');
$I->click("Bid on this Contract");
$I->see("New Bid", "h5");
$I->fillField("bid[approach]", "Approach.");
$I->fillField("bid[previous_work]", "Previous work.");
$I->fillField("bid[employee_details]", "Employee details.");
$I->click("Submit Bid");
$I->see("Thanks for submitting your bid.");
$I->see("Approach.", 'p');
$I->see("Previous work.", 'p');
$I->see("Employee details.", 'p');
$I->click("Sign Out");
/** Officer Sanity **/
示例6: WebGuy
<?php
$I = new WebGuy($scenario);
$I->wantTo('Ensure the login system works');
$I->amOnPage('/login');
$I->see('Login');
$I->submitForm('#loginForm', array('_username' => 'admin', '_password' => 'admin'));
$I->see('Beheer');
示例7: 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', array());
$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', array('ContactForm[name]' => 'tester', 'ContactForm[email]' => 'tester.email', 'ContactForm[subject]' => 'test subject', 'ContactForm[body]' => 'test content'));
//$I->dontSee('Name cannot be blank.');
$I->see('Email is not a valid email address.');
//$I->dontSee('Subject cannot be blank.');
//$I->dontSee('Body cannot be blank.');
//$I->dontSee('The verification code is incorrect');
$I->submitForm('#contact-form', array('ContactForm[name]' => 'tester', 'ContactForm[email]' => 'tester@example.com', 'ContactForm[subject]' => 'test subject', 'ContactForm[body]' => 'test content'));
$I->dontSeeElement('#contact-form');
$I->see('Thank you for contacting us. We will respond to you as soon as possible.');
示例8: WebGuy
<?php
$I = new WebGuy($scenario);
$I->wantTo('ensure that login works');
$I->amOnPage('?r=site/login');
$I->see('Login', 'h1');
$I->submitForm('#login-form', []);
$I->dontSee('Logout (admin)');
$I->see('Username cannot be blank');
$I->see('Password cannot be blank');
$I->submitForm('#login-form', ['LoginForm[username]' => 'admin', 'LoginForm[password]' => 'wrong']);
$I->dontSee('Logout (admin)');
$I->see('Incorrect username or password');
$I->submitForm('#login-form', ['LoginForm[username]' => 'admin', 'LoginForm[password]' => 'admin']);
$I->see('Logout (admin)');