在iOS上进行Flutter测试find.pageBack()不起作用

时间:2019-10-22 08:59:36

标签: ios flutter dart

我使用flutter_driver和gherkin测试我的应用程序。

我想使用操作来回滚(find.pageBack()),但Flutter驱动程序未在IOS模拟器上找到按钮。在Android上也可以。

我只是超时没有任何错误:TimeoutException after 0:00:10.000000: Future not completed

import 'package:flutter_driver/flutter_driver.dart';
import 'package:flutter_gherkin/flutter_gherkin.dart';
import 'package:gherkin/gherkin.dart';

class NavValidation extends ThenWithWorld<FlutterWorld> {
  @override
  Future<void> executeStep() async {
    await FlutterDriverUtils.getText(world.driver, find.text('sagittarius / yesterday'));
    await FlutterDriverUtils.tap(world.driver, find.pageBack());
  }

  RegExp get pattern => RegExp(r"user should land on result screen");
}

0 个答案:

没有答案