问题描述
我正在尝试为我的应用程序设置Flutter Driver测试,并且该应用程序异步运行,所以我发现https://github.com/flutter/flutter/issues/41029
表示您需要做的就是添加await driver.waitUntilFirstFrameRasterized();
并且它应该可以工作,但是这确实会停止失败失败的测试根本无法运行。
该应用程序只是挂在初始屏幕上,甚至从未进入应用程序本身。
据我所知,这是我运行测试所需的全部设置
FlutterDriver driver;
// Connect to the Flutter driver before running any tests.
setUpAll(() async {
driver = await FlutterDriver.connect();
await driver.waitUntilFirstFrameRasterized();
// await Directory('screenshots').create();
});
// Close the connection to the driver after the tests have completed.
tearDownAll(() async {
if (driver != null) {
await driver.close();
}
});
但是,我在终端中得到的只是以下输出:
VMServiceFlutterDriver: Connecting to Flutter application at http://127.0.0.1:54264/tt9kN4jBSrc=/
VMServiceFlutterDriver: Isolate found with number: 2942164624858163
VMServiceFlutterDriver: Isolate is paused at start.
VMServiceFlutterDriver: Attempting to resume isolate
VMServiceFlutterDriver: Connected to Flutter application.
VMServiceFlutterDriver: waitForCondition message is taking a long time to complete...
我已经离开它几分钟了,什么也没发生,我已经禁用了Firebase初始化,以防万一某种原因阻止了它,因为我需要接受警报对话框,而不是我能看到的那么远。 / p>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)