Skip to content

Commit 63a939b

Browse files
committed
Select only necessary fields for submitForm()
This changes the selector of fields used in `submitForm()` to get only fields with a `name` attribute. Fixes: #83
1 parent df1a28c commit 63a939b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Codeception/Module/WebDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2427,7 +2427,7 @@ public function submitForm($selector, array $params, $button = null)
24272427
$form = $this->matchFirstOrFail($this->getBaseElement(), $selector);
24282428

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

0 commit comments

Comments
 (0)