fill_action method
Implementation
@override
Future<Online> fill_action(Online browser, Map<String, Object> values) async {
for (var field in fields.keys) {
if (values[field] == null && fields[field]!.mandatory) {
if (fields[field]!.collect_data == null) {
//ask for input
values[field] = await Ask.input("form field", field);
}
values[field] = fields[field]!.collect_data!.call(browser);
}
}
for (var field in fields.keys) {
if (values[field] != null) {
Show.action("fill", field, values[field].toString());
}
await fields[field]!.fill_action(browser, values[field]);
}
return browser;
}