【问题标题】:Maestro UI test run after this error printing?打印此错误后运行 Maestro UI 测试?
【发布时间】:2022-12-20 12:54:48
【问题描述】:

我使用 Flutter 应用程序的 maestro UI 测试自动化工具进行 UI 测试,但在运行测试后发生此错误

i@is-MacBook-Pro samples % maestro test android-flow.yaml 
Exception in thread "main" java.lang.NoSuchMethodError: java.io.InputStream.readAllBytes()[B
    at maestro.cli.device.ios.Simctl.list(Simctl.kt:14)
    at maestro.cli.device.DeviceService.listIOSDevices(DeviceService.kt:164)
    at maestro.cli.device.DeviceService.listDevices(DeviceService.kt:124)
    at maestro.cli.device.DeviceService.listConnectedDevices(DeviceService.kt:114)
    at maestro.cli.device.PickDeviceInteractor.pickDeviceInternal(PickDeviceInteractor.kt:33)
    at maestro.cli.device.PickDeviceInteractor.pickDevice(PickDeviceInteractor.kt:14)
    at maestro.cli.util.MaestroFactory.createMaestro(MaestroFactory.kt:35)
    at maestro.cli.command.TestCommand.call(TestCommand.kt:63)
    at maestro.cli.command.TestCommand.call(TestCommand.kt:31)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1933)
    at picocli.CommandLine.access$1200(CommandLine.java:145)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2332)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2326)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2291)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2159)
    at picocli.CommandLine.execute(CommandLine.java:2058)
    at maestro.cli.AppKt.main(App.kt:97)

i@is-MacBook-Pro 样本 % 大师测试 android-flow.yaml

【问题讨论】:

  • 请提供足够的代码,以便其他人可以更好地理解或重现问题。

标签: java kotlin exception yaml ui-automation


【解决方案1】:

在我看来,您目前有两个 JDK 版本,对于 Maestro,如果您安装 JDK 11 并删除其他版本,然后检查它就可以正常工作

【讨论】:

    猜你喜欢
    • 2018-10-02
    • 1970-01-01
    • 1970-01-01
    • 2021-10-20
    • 2022-12-23
    • 2017-06-04
    • 1970-01-01
    • 2018-08-05
    • 2015-04-05
    相关资源
    最近更新 更多