I am testing a flutter Cupertino styled app using flutter drive.
I have trouble closing a full-screen page because I cannot find the close button.
What would be the correct find.by???
instruction to be able to tap the close button in a
Cupertino styled app?
You can use find.pageBack()
like in await driver.tap(find.pageBack());
to find the button that has the page back functionality, either a back arrow or a close cross, if present in the AppBar.
Alternatively you can use directly find.byTooltip('Back')
or find.byTooltip('Close')
to find back arrows or close buttons.