Open HansMuller opened 7 years ago
I was about to file an issue with title Provide an API from Flutter Driver to grab targeted device info but this might be a duplicate.
A use case emerged at Google recently. Client apps want to run a driver test that performs a different action/matcher depending on the platform of the targeted device. They tried Platform.isIOS
on the driver (a natural thing to do) and they were surprised that it did not work. I also learned recently that the driver itself actually runs on the host; previously I was assuming that it was running on device in a separate process (like Espresso).
An API such as driver.getDeviceInfo()
would be nice. This could return the device platform, id and other information.
Internal: b/124657370
Currently the flutter driver test that collections screenshots (see examples/catalog/bin/screenshot_test.dart.template) incorrectly assumes that if it's running on MacOS, it's targeting an iOS device.
It would preferable to just ask the FlutterDriver for the target device's deviceId, or OS.
I've patched the problem for now https://github.com/flutter/flutter/pull/10583