Skip to content

Flutter driver doesn't have a way to find the current state of toggle button #62106

@sohitEngg

Description

@sohitEngg

Actually while working on the integration tests in flutter I am trying to perform assertion on the toggle button where I need to find the actual state of Toggle button (Switch OFF/ON).

FlutterDriver has following method to get the text of different controls e.g. Text().

FlutterDriver.getText(Finder);

I am not able to find any similar kind of method for fetching the flag value of Toggle button (ON/OFF).

There is a tricky way to achieve this which is to iterate through the "getWidgetDiagnostics" view hierarchy of the toggle button but I am looking for an official solution for this.

Can you please add a feature in flutter driver in the reference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.t: flutter driver"flutter driver", flutter_drive, or a driver testteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions