Appium java-client 3.3.0 不想启动
Appium java-client 3.3.0 doesnt want to start
更新到 java-client 3.3.0 后,我的测试不想开始。我的 Appium 版本是 1.4.16.1(最新)。
我的能力:
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)
}
我的依赖项:
<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>
但是无法编译。控制台日志:
[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] ------------------------------------------------------------------------
我没有在此处或 Google 中找到任何解决方案。如果我尝试降级到 java-client 3.2.0 一切正常。但是在官方文档中我没有找到任何解决方案。
有点棘手。我尝试修改 java-客户端依赖:
<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 依赖项。但是我的依赖之一是我的第二个项目,它也有 Selenium 依赖。在第二个项目中是旧版本的 Selenium (2.42.2)。所以这两个项目不能一起工作。将第二个项目更新到 Selenium 2.48.2(最新)后,一切似乎都正常。
更新到 java-client 3.3.0 后,我的测试不想开始。我的 Appium 版本是 1.4.16.1(最新)。
我的能力:
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)
}
我的依赖项:
<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>
但是无法编译。控制台日志:
[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] ------------------------------------------------------------------------
我没有在此处或 Google 中找到任何解决方案。如果我尝试降级到 java-client 3.2.0 一切正常。但是在官方文档中我没有找到任何解决方案。
有点棘手。我尝试修改 java-客户端依赖:
<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 依赖项。但是我的依赖之一是我的第二个项目,它也有 Selenium 依赖。在第二个项目中是旧版本的 Selenium (2.42.2)。所以这两个项目不能一起工作。将第二个项目更新到 Selenium 2.48.2(最新)后,一切似乎都正常。