[InvalidArgumentException] Unreachable field “” fillField Codeception Yii2

How to fix [InvalidArgumentException] Unreachable field “” error in Codeception and Yii2?

To fix the [InvalidArgumentException] Unreachable field “” when you are using the fillField in Codeception do the following:

  1. Check that your HTML has been written correctly by validating it on https://validator.w3.org/
  2. Make sure that your input fields are written inside <form> tags
  3. Make sure that all your input fields have a name=”” attribute

The issue with my code was that I forgot to set the name attribute for one of my inputs.

Leave a Reply