FlutterDriver class

Drives a Flutter Application running in another process.

Constructors

FlutterDriver.connectedTo(VMServiceClient serviceClient, Peer _peer, VMIsolate appIsolate, { bool printCommunication: false, bool logCommunicationToFile: true })
Creates a driver that uses a connection provided by the given serviceClient, _peer and appIsolate.

Properties

appIsolate → VMIsolate
The main isolate hosting the Flutter application. [...]
final
serviceClient → VMServiceClient
Client connected to the Dart VM running the Flutter application [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

checkHealth({Duration timeout }) Future<Health>
Checks the status of the Flutter Driver extension.
clearTimeline({Duration timeout: kUnusuallyLongTimeout }) Future<void>
Clears all timeline events recorded up until now. [...]
close() Future<void>
Closes the underlying connection to the VM service. [...]
enterText(String text, { Duration timeout }) Future<void>
Enters text into the currently focused text input, such as the EditableText widget. [...]
forceGC() Future<void>
Force a garbage collection run in the VM.
getBottomLeft(SerializableFinder finder, { Duration timeout }) Future<DriverOffset>
Returns the point at the bottom left of the widget identified by finder. [...]
getBottomRight(SerializableFinder finder, { Duration timeout }) Future<DriverOffset>
Returns the point at the bottom right of the widget identified by finder. [...]
getCenter(SerializableFinder finder, { Duration timeout }) Future<DriverOffset>
Returns the point at the center of the widget identified by finder. [...]
getRenderObjectDiagnostics(SerializableFinder finder, { int subtreeDepth: 0, bool includeProperties: true, Duration timeout }) Future<Map<String, Object>>
Returns a JSON map of the DiagnosticsNode that is associated with the RenderObject identified by finder. [...]
getRenderTree({Duration timeout }) Future<RenderTree>
Returns a dump of the render tree.
getSemanticsId(SerializableFinder finder, { Duration timeout }) Future<int>
Retrieves the semantics node id for the object returned by finder, or the nearest ancestor with a semantics node. [...]
getText(SerializableFinder finder, { Duration timeout }) Future<String>
Returns the text in the Text widget located by finder.
getTopLeft(SerializableFinder finder, { Duration timeout }) Future<DriverOffset>
Returns the point at the top left of the widget identified by finder. [...]
getTopRight(SerializableFinder finder, { Duration timeout }) Future<DriverOffset>
Returns the point at the top right of the widget identified by finder. [...]
getVmFlags() Future<List<Map<String, dynamic>>>
Returns the Flags set in the Dart VM as JSON. [...]
getWidgetDiagnostics(SerializableFinder finder, { int subtreeDepth: 0, bool includeProperties: true, Duration timeout }) Future<Map<String, Object>>
Returns a JSON map of the DiagnosticsNode that is associated with the Widget identified by finder. [...]
requestData(String message, { Duration timeout }) Future<String>
Sends a string and returns a string. [...]
runUnsynchronized<T>(Future<T> action(), { Duration timeout }) Future<T>
action will be executed with the frame sync mechanism disabled. [...]
screenshot() Future<List<int>>
Take a screenshot. [...]
scroll(SerializableFinder finder, double dx, double dy, Duration duration, { int frequency: 60, Duration timeout }) Future<void>
Tell the driver to perform a scrolling action. [...]
scrollIntoView(SerializableFinder finder, { double alignment: 0.0, Duration timeout }) Future<void>
Scrolls the Scrollable ancestor of the widget located by finder until the widget is completely visible. [...]
scrollUntilVisible(SerializableFinder scrollable, SerializableFinder item, { double alignment: 0.0, double dxScroll: 0.0, double dyScroll: 0.0, Duration timeout }) Future<void>
Repeatedly scroll the widget located by scrollable by dxScroll and dyScroll until item is visible, and then use scrollIntoView to ensure the item's final position matches alignment. [...]
setSemantics(bool enabled, { Duration timeout }) Future<bool>
Turns semantics on or off in the Flutter app under test. [...]
setTextEntryEmulation({bool enabled, Duration timeout }) Future<void>
Configures text entry emulation. [...]
startTracing({List<TimelineStream> streams: _defaultStreams, Duration timeout: kUnusuallyLongTimeout }) Future<void>
Starts recording performance traces. [...]
stopTracingAndDownloadTimeline({Duration timeout: kUnusuallyLongTimeout }) Future<Timeline>
Stops recording performance traces and downloads the timeline. [...]
tap(SerializableFinder finder, { Duration timeout }) Future<void>
Taps at the center of the widget located by finder.
traceAction(Future action(), { List<TimelineStream> streams: _defaultStreams, bool retainPriorEvents: false }) Future<Timeline>
Runs action and outputs a performance trace for it. [...]
waitFor(SerializableFinder finder, { Duration timeout }) Future<void>
Waits until finder locates the target.
waitForAbsent(SerializableFinder finder, { Duration timeout }) Future<void>
Waits until finder can no longer locate the target.
waitUntilFirstFrameRasterized() Future<void>
Waits until the next Window.onReportTimings is called. [...]
waitUntilNoTransientCallbacks({Duration timeout }) Future<void>
Waits until there are no more transient callbacks in the queue. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Static Methods

connect({String dartVmServiceUrl, bool printCommunication: false, bool logCommunicationToFile: true, int isolateNumber, Pattern fuchsiaModuleTarget }) Future<FlutterDriver>
Connects to a Flutter application. [...]