when method
When / Then
eg. wait for a context menu to appear and select the 'Spreadsheet' option from the context menu
when(Css('divrole="menu"'), (x) => x.click(Css('divrole="menu"')))
Implementation
Future<Online> when(Waitable waitable, MapFunc<Online, dynamic> action,
{Duration? timeout}) async {
Show.waiting_for(waitable.toString(), "to be ready");
await waitable.wait(this);
await action(this);
return this;
}