Reputation: 189
I am trying to do a long-press with flutter drive integration test.
using
await driver.tap(longPressButtonFinder);
does not help, is there something better than that?
Upvotes: 3
Views: 1541
Reputation: 5605
The longPress method has been added to the WidgetTester
class
FlutterDriver
doesn't seem to have this method out of the box.
A workaround is to scroll with a 0 delta. That will lead the driver to do what effectively is a long press.
await driver.scroll(target, 0, 0, Duration(milliseconds: 400));
Upvotes: 13