Skip to content

Take platform screenshots on Android #152189

@matanlurey

Description

@matanlurey

FlutterDriver already supports taking a screenshot, but this screenshot is based on the Flutter engine's view of the world, and as a result, omits platform-views (views that are drawn and managed by the platform).

An example of platform views include:

Using a new API (e.g. nativeDriver.screenshot()), it should be possible to take a "native" screenshot, using whatever the platform provides. For example, on Android, this would likely be (a variation of) adb shell screencap, on iOS idevicescreenshot, and so on.

These screenshots will not be cropped, and may include system shell UI. The former will not be addressed at the moment, but the latter can be partially addressed by using a device's appropriate "demo mode" (sometimes called "immersive mode"), or otherwise trying to create a somewhat hermetic screenshot environment (to the best of our ability).

Platform screenshots will likely be opaque objects, because they will exist as a file on disk, not bytes.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: new featureNothing broken; request for a new capabilityc: tech-debtTechnical debt, code quality, testing, etc.t: flutter driver"flutter driver", flutter_drive, or a driver test

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions