zoukankan      html  css  js  c++  java
  • new AppiumDriver<>(new URL(url), capabilities) 报错 java.lang.NoSuchMethodError: com.google.common.base.Throwables.throwIfUnchecked(Ljava/lang/Throwable;)V

    2017-10-11 17:37:02.102 INFO c.u.a.r.PrepareDriver:41 - appium server url : http://127.0.0.1:4723/wd/hub

    java.lang.NoSuchMethodError: com.google.common.base.Throwables.throwIfUnchecked(Ljava/lang/Throwable;)V

    at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:103)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:641)
    at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
    at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:254)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:236)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:137)
    at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:38)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:87)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:111)
    at com.ucredit.assistant.runnerable.PrepareDriver.getDriver(PrepareDriver.java:42)
    at com.ucredit.assistant.runnerable.TestSuiteManager.beforeSuite(TestSuiteManager.java:44)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:326)
    at org.testng.SuiteRunner.run(SuiteRunner.java:289)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
    at org.testng.TestNG.runSuites(TestNG.java:1144)
    at org.testng.TestNG.run(TestNG.java:1115)
    at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
    at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)

     创建session成功但应用报错测试无法继续,按错误提示应为指定方法不存在,由此判断应为jar包问题

    经查验com.google.common.base为guava包中类,应用原pom引用19.0版本确实无此方法,升级版本是23.1rc后功能正常

  • 相关阅读:
    EventLog实现事件日志操作
    可否控制<link type=text/css rel=stylesheet href=style.css>
    强制IE浏览器或WebBrowser控件使用指定版本显示网页2
    C#中的@符号
    C#运算符大全_各种运算符号的概述及作用
    调试时设置条件断点
    C语言:用字符读取流和输出流来读写入数据。(文本文件)
    建立完整的单向动态链表(包括初始化、创建、插入、删除、查找、销毁、输出)
    C语言:创建动态单向链表,创建完成后,输出每一个节点的数据信息。
    C语言:使用realloc函数对malloc或者calloc动态分配的内存大小进行扩展
  • 原文地址:https://www.cnblogs.com/Gent-Wang/p/7652059.html
Copyright © 2011-2022 走看看