userType
Future<
Simulates a user typing text into an input.
Implementation
Future<void> userType(DomNode element, String text) async {
fireFocus(element);
final buffer = StringBuffer(element.value);
for (final char in text.split('')) {
fireKeyDown(element, key: char);
fireKeyPress(element, key: char);
buffer.write(char);
fireInput(element, value: buffer.toString());
fireKeyUp(element, key: char);
}
}