seeInField() public method

Checks that the given input field or textarea contains the given value. For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. php seeInField('Body','Type your comment here'); $I->seeInField('form textarea[name=body]','Type your comment here'); $I->seeInField('form input[type=hidden]','hidden_value'); $I->seeInField('#searchform input','Search'); $I->seeInField('//form/*[@name=search]','Search'); $I->seeInField(['name' => 'search'], 'Search'); ?>
See also: Codeception\Lib\InnerBrowser::seeInField()
public seeInField ( $field, $value )
$field
$value
/**
* 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', '*****@*****.**');
$I->fillField('input#email1', '*****@*****.**');
$I->click('Remove contact');
$I->click('Add contact');
$I->fillField('input#email1', '*****@*****.**');
$I->seeInField('input#email0', '*****@*****.**');
$I->seeInField('input#email1', '*****@*****.**');
//-----------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);
$option = 'Euro';
$I->selectOption("#currency_id", $option);
<?php

$I = new WebGuy($scenario);
$I->wantTo('click invoice now');
$I->amOnPage('/');
$I->click('#startButton');
$I->seeInDatabase('users', ['id' => 1]);
$I->wantTo('create a client');
$I->click('#createClientLink');
$I->fillField('input#email', '*****@*****.**');
$I->click('#clientDoneButton');
$I->click('#saveButton');
$I->seeInDatabase('contacts', ['email' => '*****@*****.**']);
$I->seeInField('input#email', '*****@*****.**');
Beispiel #3
0
<?php

/**
 * this acceptance test expects the path http://localhost/winkform/ to point to the directory /example/
 * All input elements are inside the TestForm and rendered in the example.
 */
$I = new WebGuy($scenario);
$I->wantTo('see the test form');
$I->amOnPage('/');
$I->see('form', '#container');
// no errors or warnings must be displayed
$I->dontSee('error');
$I->dontSee('Error');
$I->dontSee('Warning');
$I->dontSee('warning');
// address field
$I->wantTo('check the address field');
$I->see('.address');
$I->seeElement('label[for=address-postal-code]');
$I->seeElement('input#address-postal-code');
$I->seeInField('input#address-postal-code', 'postal code');
$I->see('focus', 'script');
// chained dropdowns
$I->wantTo('check the chained dropdowns');
$I->seeElement('select#one');
$I->see('chainedTo', 'script');
Beispiel #4
0
<?php

$I = new WebGuy($scenario);
use Codeception\Util\Locator;
$I->wantTo('sing in google');
$I->amOnPage('/');
$I->see('Увійти');
$I->click('Увійти');
$I->appendField('#Email', 'anton.sylantiev');
$I->seeInField('#Email', 'anton.sylantiev');
$I->see('Один обліковий запис. Усі сервіси Google.');
$I->see('Один обліковий запис Google для всіх служб Google');
$I->seeLink('Потрібна допомога?');
$I->see('Створити обліковий запис');
$I->seeElement("//*[@id='next']");
$I->click('Далі');
$I->seeCheckboxIsChecked('#PersistentCookie');
$I->see('Забули пароль?');
include 'const.php';
$I->fillField('Пароль', $pass);
$I->see('Увійти');
$I->click('Увійти');
$I->see('Anton');
$I->click(".//*[@id='gbw']/div/div/div[2]/div[4]/div[1]/a/span");
$I->see('Anton Sylantiev');
$I->see('*****@*****.**');