Checks if the array of form parameters (name => value) are set on the form matched with the
passed selector.
php
seeInFormFields('form[name=myform]', [
'input1' => 'value',
'input2' => 'other value',
]);
?>
For multi-select elements, or to check values of multiple elements with the same name, an
array may be passed:
php
seeInFormFields('.form-class', [
'multiselect' => [
'value1',
'value2',
],
'checkbox[]' => [
'a checked value',
'another checked value',
],
]);
?>
Additionally, checkbox values can be checked with a boolean.
php
seeInFormFields('#form-id', [
'checkbox1' => true, // passes if checked
'checkbox2' => false, // passes if unchecked
]);
?>
Pair this with submitForm for quick testing magic.
php
'value',
'field2' => 'another value',
'checkbox1' => true,
...
];
$I->submitForm('//form[@id=my-form]', $form, 'submitButton');
$I->amOnPage('/path/to/form-page') may be needed
$I->seeInFormFields('//form[@id=my-form]', $form);
?>