0

How can I bypass this issue while performing an integration test for Flutter web using Flutter integration_test framework? In this web, I use FilePicker to load a file on a local pc and stuck when performing e2e using integration_test, issue is captured below enter image description here

Or can anyone suggest another way of doing automation(e2e) for Flutter Web instead of the Flutter integration test, really appreciate that.

Currently, I use hardcode to bypass but it is not a good solution when performing e2e testing.

  • I don't think Flutter has any control over the file picker dialog, Flutter at most can launch the native file picker dialog programmatically but won't be able to select the file for you. I believe you should hardcode the path to the file in your tests. – Mahesh Jamdade Jul 16 '23 at 00:51

1 Answers1

0

This is currently not possible as of today, the Flutter driver does not allow interaction with native dialogs and has no control over it. You can at most launch the native file picker dialog from your test by interacting with Flutter widgets but it won't be able to select the file for you.

see the open issue for more details https://github.com/flutter/flutter/issues/86295

Mahesh Jamdade
  • 17,235
  • 8
  • 110
  • 131