首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Appium java-client 3.3.0不想启动

Appium java-client 3.3.0不想启动
EN

Stack Overflow用户
提问于 2015-12-16 12:42:42
回答 1查看 557关注 0票数 2

在更新到3.3.0之后,我的测试不想启动。我的Appium在1.4.16.1 (最新版本)中。

我的能力:

代码语言:javascript
复制
def setupTest: AndroidDriver[AndroidElement] = {
  val caps: DesiredCapabilities = new DesiredCapabilities
  caps.setCapability(CapabilityType.BROWSER_NAME, "")
  caps.setCapability("platformName", Setting.platformName)
  caps.setCapability("deviceName", Setting.deviceName)
  caps.setCapability("platformVersion", Setting.androidVersion.toString)
  caps.setCapability("appActivity", Setting.appActivity)
  caps.setCapability("app", Setting.pathToApp)
  caps.setCapability("unicodeKeyboard", true)
  caps.setCapability("resetKeyboard", false)
  caps.setCapability("newCommandTimeout", 600)
  new AndroidDriver(new URL(Setting.urlToServer), caps)
}

我的依赖关系:

代码语言:javascript
复制
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>2.48.2</version>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-server</artifactId>
        <version>2.48.2</version>
    </dependency>
    <dependency>
        <groupId>io.appium</groupId>
        <artifactId>java-client</artifactId>
        <version>3.3.0</version>
    </dependency>

但是它不能被编译。控制台日志:

代码语言:javascript
复制
[INFO] C:\Users\medek\workspace\AndroidAppiumTests\src\main\java:-1: info: compiling
[INFO] C:\Users\medek\workspace\AndroidAppiumTests\src\main\scala:-1: info: compiling
[INFO] Compiling 52 source files to C:\Users\medek\workspace\AndroidAppiumTests\target\classes at 1450269109670
[WARNING] warning: Class org.openqa.selenium.remote.http.HttpClient not found - continuing with a stub.
[WARNING] warning: Class org.openqa.selenium.remote.http.HttpClient not found - continuing with a stub.
[WARNING] warning: Class org.openqa.selenium.remote.http.HttpClient not found - continuing with a stub.
[WARNING] warning: Class org.openqa.selenium.remote.http.HttpClient not found - continuing with a stub.
[WARNING] warning: Class org.openqa.selenium.remote.http.HttpClient not found - continuing with a stub.
[WARNING] warning: Class org.openqa.selenium.remote.http.HttpClient not found - continuing with a stub.
[WARNING] warning: Class org.openqa.selenium.remote.http.HttpClient not found - continuing with a stub.
[WARNING] warning: Class org.openqa.selenium.remote.http.HttpClient not found - continuing with a stub.
[ERROR] error: Unable to locate class corresponding to inner class entry for Factory in owner org.openqa.selenium.remote.http.HttpClient
[ERROR] error: Unable to locate class corresponding to inner class entry for Builder in owner org.openqa.selenium.remote.service.DriverService
[WARNING] 8 warnings found
[ERROR] two errors found
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

我在这里和谷歌没有找到任何解决方案。如果我试图降级到java 3.2.0,一切都很好。但在官方文件中,我没有找到任何解决办法。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-12-17 12:00:27

有点棘手。我试图修改java-客户机依赖关系:

代码语言:javascript
复制
    <dependency>
        <groupId>io.appium</groupId>
        <artifactId>java-client</artifactId>
        <version>LATEST</version>
        <exclusions>
            <exclusion>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-java</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

并删除所有硒依赖项。但我的一个依赖项是我的第二个项目,它也依赖于硒。在第二个项目中,Selenium的旧版本(2.42.2)。所以这两个项目不能一起工作。在将第二个项目更新为Selenium 2.48.2 (最新)之后,一切看起来都很好。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34312395

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档