Codeception Laravel4 module issue. Line 7 makes this fail for me. It only responds to the label's body. Not name or id of the input. 20 second video example: http://d.pr/v/hn0q
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$I = new TestGuy($scenario); | |
$I->wantTo('register for a new account'); | |
$I->amOnPage('/register'); | |
$I->see('Register', 'h1'); | |
$I->fillField('email', 'joe@sample.com'); | |
$I->fillField('Password:', 'password'); | |
$I->click('Register'); | |
$I->seeCurrentUrlEquals('/login'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset=utf-8> | |
<title>Register</title> | |
</head> | |
<body> | |
<h1>Register</h1> | |
{{ Form::open() }} | |
{{ Form::label('email', 'Email:') }} | |
{{ Form::text('email') }} | |
{{ Form::label('password', 'Password:') }} | |
{{ Form::text('password') }} | |
{{ Form::submit('Register') }} | |
{{ Form::close() }} | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's ok. To match element by ID you should use CSS selector, or XPath locator.
Basically, smth like this:
At first element is searched by label/text/etc (depending on element). There are pretty complex XPath locators in Mink and BrowserKit to guess the proper element. But if they fail Codeception retries with matching by CSS. If CSS matching fails, Codeception tries to use it as XPath.
Bruteforce that works:)