I'd like to add a little to @xpeldev's answer 5 years later
I use Patrol for my integration tests and some of my tests dealing with TextFormFields started failing. I was able to fix them by doing two things: making sure the stylus mode was turned off on the emulator (disabled the keyboard from showing up) and by adding the parameter `hideKeyboard: false` to the enterText method. So, my test ended up looking like this:
```
// K.episodeCountText is a Key in another file
await $.enterText($(K.episodeCountText), '15',
hideKeyboard: false,
);
await $.tester.testTextInput.receiveAction(TextInputAction.done);
await $.pumpAndSettle();
// Verify the setting was updated
expect(appSettings.gloablEpisodeCount, 15,
reason: 'Episode count changed');
```
With this my integration tests started passing again.
I'd like to add a little to @Omatt answer 5 years later
I use Patrol for my integration tests and some of my tests dealing with TextFormFields started failing. I was able to fix them by doing two things: making sure the stylus mode was turned off on the emulator (disabled the keyboard from showing up) and by adding the parameter `hideKeyboard: false` to the enterText method. So, my test ended up looking like this:
```
// K.episodeCountText is a Key in another file
await $.enterText($(K.episodeCountText), '15',
hideKeyboard: false,
);
await $.tester.testTextInput.receiveAction(TextInputAction.done);
await $.pumpAndSettle();
// Verify the setting was updated
expect(appSettings.gloablEpisodeCount, 15,
reason: 'Episode count changed');
```
With this my integration tests started passing again.