public function testSubmitUnchecked() { $this->module->amOnPage('/form/unchecked'); $this->module->seeCheckboxIsChecked('#checkbox'); $this->module->uncheckOption('#checkbox'); $this->module->click('#submit'); $this->module->see('0', '#notice'); }
public function testBug1637() { $this->module->amOnPage('/form/bug1637'); // confirm that options outside a form are still selectable $this->module->selectOption('input[name=first_test_radio]', 'Yes'); // confirm that it did what we expected and did not do anything else $this->module->seeOptionIsSelected('input[name=first_test_radio]', 'Yes'); $this->module->dontSeeOptionIsSelected('input[name=first_test_radio]', 'No'); }
public function testAppendFieldDiv() { $this->module->amOnPage('/form/div_content_editable'); //make sure we see 'sunrise' which is the default text in the textarea $this->module->see('sunrise', '#description'); //fill in some new text and see if we can see it $textarea_value = 'moonrise'; $this->module->appendField('#description', $textarea_value); $this->module->see('sunrise' . $textarea_value, '#description'); }
public function testSessionSnapshots() { $this->module->amOnPage('/'); $this->module->setCookie('PHPSESSID', '123456', ['path' => '/']); $this->module->saveSessionSnapshot('login'); $this->module->seeCookie('PHPSESSID'); $this->webDriver->manage()->deleteAllCookies(); $this->module->dontSeeCookie('PHPSESSID'); $this->module->loadSessionSnapshot('login'); $this->module->seeCookie('PHPSESSID'); }
public function testEmptyFormSubmit() { $this->shouldFail(); $this->module->amOnPage('/form/complex'); $this->module->submitForm('form111', array()); }
public function testSeeElementMalformedWdLocator() { $this->setExpectedException('Codeception\\Exception\\MalformedLocator'); $this->module->amOnPage('/'); $this->module->seeElement(WebDriverBy::xpath('H---EY!')); }
/** * @Issue 2921 */ public function testSeeInFieldForTextarea() { $this->module->amOnPage('/form/bug2921'); $this->module->seeInField('foo', 'bar baz'); }