此错误打印后运行 Maestro UI 测试?

问题描述 投票:0回答:1

我正在使用 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 ui-automation maestro
1个回答
0
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.