Skip to content

Commit

Permalink
Merge pull request #84 from double-or-nothing/bugfix/submit-form-sele…
Browse files Browse the repository at this point in the history
…ctor

Select only necessary fields for submitForm()
  • Loading branch information
Naktibalda authored Dec 25, 2021
2 parents d1cb3af + 63a939b commit 930ebf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Codeception/Module/WebDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -2427,7 +2427,7 @@ public function submitForm($selector, array $params, $button = null)
$form = $this->matchFirstOrFail($this->getBaseElement(), $selector);

$fields = $form->findElements(
WebDriverBy::cssSelector('input:enabled,textarea:enabled,select:enabled,input[type=hidden]')
WebDriverBy::cssSelector('input:enabled[name],textarea:enabled[name],select:enabled[name],input[type=hidden][name]')
);
foreach ($fields as $field) {
$fieldName = $this->getSubmissionFormFieldName($field->getAttribute('name'));
Expand Down

0 comments on commit 930ebf7

Please sign in to comment.