How can I write a test to wait for close app using Flutter Driver

Viewed 450

I have to test my agreement when the app is first launched: if the user do not agree, than the app must close.

Most of the test are already working but I couldn't figure out how to test if the app has closed.

Is there any way to test this behavior and "expect for close app"?

Thanks, Ian

2 Answers
  1. Run the app
  2. Initialise flutter driver.
  3. Check that flutter driver is not null
  4. Close the app (the app should be closed and not backgrounded)
  5. driver.checkHealth
Related