Codem\DamnFineUploader\_generated\AcceptanceTesterActions::seeInFormFields
[!] Method is generated. Documentation taken from corresponding module.
Checks if the array of form parameters (name => value) are set on the form matched with the passed selector. ``` php <?php $I->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 <?php $I->seeInFormFields('.form-class', [ 'multiselect' => [ 'value1', 'value2', ], 'checkbox[]' => [ 'a checked value', 'another checked value', ], ]); ?> ``` Additionally, checkbox values can be checked with a boolean. ``` php <?php $I->seeInFormFields('#form-id', [ 'checkbox1' => true, // passes if checked 'checkbox2' => false, // passes if unchecked ]); ?> ``` Pair this with submitForm for quick testing magic. ``` php <?php $form = [ 'field1' => '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); ?> ```
Signature
public function seeInFormFields(
$formSelector,
$params )
Parameters
$formSelector
—$params
—