New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhpBrowser merges multiple forms if they have the same action attribute #2331

Closed
Naktibalda opened this Issue Sep 2, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@Naktibalda
Member

Naktibalda commented Sep 2, 2015

Related to #2087
HTML:

<form action="">
  <input name="a" value="" />
  <input name="b" value="" />
  <input type="submit" name="submit1" value="Submit1" />
</form>
<form action="">
  <input name="c" value="" />
  <input type="submit" name="submit2" value="Submit2" />
</form>

Test 1:

$I->amOnPage('/');
$I->fillField('a', 'foo');
$I->fillField('b', 'bar');
$I->click('Submit2');
$I->seeCurrentUrlEquals('/?c=&submit2=Submit2');
//actual url: ?a=foo&b=bar&submit2=Submit2

Test 2:

$I->amOnPage('/');
$I->fillField('c', 'baz');
$I->click('Submit1');
$I->seeCurrentUrlEquals('/?a=&b=&submit1=Submit1');
//actual url: ?c=baz&submit1=Submit1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment