微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

我正在尝试在 AWS 设备群 iOS 设备上使用 Java、Selenium 和 Appium 运行自动化测试用例我收到 NoSuchMethodError

如何解决我正在尝试在 AWS 设备群 iOS 设备上使用 Java、Selenium 和 Appium 运行自动化测试用例我收到 NoSuchMethodError

这是我在 AWS iOS 设备上运行代码时遇到的错误。相同的代码在 Android 设备上运行良好 安卓 AWS iOS 设备 看不到 WDA 安装

 [TestNG] java.lang.NoSuchMethodError: com.google.common.base.Throwables.throwIfUnchecked(Ljava/lang/Throwable;)V
    [TestNG]    at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:253)
    [TestNG]    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
    [TestNG]    at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41)
    [TestNG]    at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
    [TestNG]    at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
    [TestNG]    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
    [TestNG]    at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:336)
    [TestNG]    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
    [TestNG]    at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:37)
    [TestNG]    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:88)
    [TestNG]    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:98)
    [TestNG]    at io.appium.java_client.ios.IOSDriver.<init>(IOSDriver.java:90)
    [TestNG]    at utilities.awsDeviceFarmUtils.launchAppSub_AWS(awsDeviceFarmUtils.java:311)
    [TestNG]    at utilities.awsDeviceFarmUtils.launchApp_ExistingUser(awsDeviceFarmUtils.java:32)
    [TestNG]    at localTests.sampleTest.sampleTest(sampleTest.java:234)
    [TestNG]    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [TestNG]    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [TestNG]    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [TestNG]    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    [TestNG]    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
    [TestNG]    at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    [TestNG]    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    [TestNG]    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    [TestNG]    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    [TestNG]    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    [TestNG]    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    [TestNG]    at org.testng.TestRunner.run(TestRunner.java:617)
    [TestNG]    at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
    [TestNG]    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343)
    [TestNG]    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
    [TestNG]    at org.testng.SuiteRunner.run(SuiteRunner.java:254)
    [TestNG]    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    [TestNG]    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    [TestNG]    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    [TestNG]    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    [TestNG]    at org.testng.TestNG.run(TestNG.java:1057)
    [TestNG]    at org.testng.TestNG.privateMain(TestNG.java:1364)
    [TestNG]    at org.testng.TestNG.main(TestNG.java:1333)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。