Add id or name property or other means of identification for Flutter Web applications?

后端 未结 2 571
长发绾君心
长发绾君心 2021-02-08 17:36

Writing a Flutter Web application, I try to leverage a Web-UI-Testing framework based on Selenium. Sadly I fail to identify a HTML-Element representing a certain flutter widget

2条回答
  •  走了就别回头了
    2021-02-08 18:16

    I do not think it is right way to use any Selenium kind of testing framework for Flutter Web.

    Reason for that is that you (as web developer) have no control on how generated DOM looks like. Which means you can not use XPath and other means to select elements.

    I suppose the only way of testing Flutter apps (including Flutter Web) is using Flutter Driver: https://api.flutter.dev/flutter/flutter_driver/flutter_driver-library.html

提交回复
热议问题