Checks that the specified checkbox is checked.
php
seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
$I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
$I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
?>
public seeCheckboxIsChecked ( $checkbox ) | ||
$checkbox |
$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'); $I->fillField('post_title', 'Test Post for ' . $authcode['description']); $I->click('Text'); $I->fillField('content', 'Content for ' . $authcode['description']); $I->click('Visual'); $I->fillField('excerpt', 'Excerpt for ' . $authcode['description']); $I->checkOption('#pubcode_' . $authcode['name']); $I->wait(2); $I->click('Publish', '#publishing-action'); $I->see('Post Published'); $I->seeCheckboxIsChecked('#pubcode_' . $authcode['name']); } $I->amGoingTo('Log Out so we can check that the content is password protected'); $WP->logout(); $I->amGoingTo('Test the protected content'); foreach ($pubcodes[$a] as $authcode) { $I->amOnPage('/'); $I->click('Test Post for ' . $authcode['description']); $I->see('Enter your username and password below'); $I->fillField('log', $sample_accounts[$a]['username']); $I->fillField('pwd', $sample_accounts[$a]['password']); $I->click('Log In'); $I->see($sample_accounts[$a]['expected_results'][$authcode['name']]); $WP->logout(); } $I->amGoingTo('Log in as admin');
<?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('*****@*****.**');