public function testComplexSelectorsAndForms() { $this->module->amOnPage('/login'); $this->module->submitForm('form#user_form_login', array('email' => '*****@*****.**', 'password' => '111111')); $post = data::get('form'); $this->assertEquals('*****@*****.**', $post['email']); }
public function testSeeElementOnPage() { $this->module->amOnPage('/form/field'); $this->module->seeElement('input[name=name]'); $this->module->seeElement('descendant-or-self::input[@id="name"]'); $this->module->dontSeeElement('#something-beyond'); $this->module->dontSeeElement('descendant-or-self::input[@id="something-beyond"]'); }
public function testExample1() { $this->module->amOnPage('/form/example1'); $this->module->see('Login', 'button'); $this->module->fillField('#LoginForm_username', 'davert'); $this->module->fillField('#LoginForm_password', '123456'); $this->module->checkOption('#LoginForm_rememberMe'); $this->module->click('Login'); $login = data::get('form'); $this->assertEquals('davert', $login['LoginForm']['username']); $this->assertEquals('123456', $login['LoginForm']['password']); $this->assertNotEmpty($login['LoginForm']['rememberMe']); }