Appium-JAVA 错误:无法从捆绑包'731'加载类'org.eclipse.ui.internal.ide.application.addons.ModelCleanupAddon'



stacktrace 屏幕截图 我正在尝试通过 Appium 在 Android 设备上运行我编写的不同测试,但我收到以下错误:

无法从捆绑包"731"加载类"org.eclipse.ui.internal.ide.application.addons.ModelCleanupAddon"

无法从捆绑包"561"加载类"org.eclipse.ui.internal.ide.application.addons.ModelCleanupAddon"

我的代码是:

import org.openqa.selenium.By;
//import org.openqa.selenium.WebDriver; 
import org.openqa.selenium.WebElement;
//import org.openqa.selenium.WebElement;
//import org.openqa.selenium.remote.DesiredCapabilities;
//import org.openqa.selenium.remote.RemoteWebDriver;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.android.AndroidDriver;
//import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass; 
import org.testng.annotations.Test;
import org.testng.annotations.AfterTest;

 import java.io.File; 
 import java.net.URL;
 import java.net.MalformedURLException;
 //import java.util.concurrent.TimeUnit;
 //import org.junit.Test;

 public class CustomerLogin {
         AppiumDriver driver;
         takeScreenshot SC;
         @BeforeClass
           public void setUp() throws MalformedURLException{
           File app = new File(System.getProperty("user.dir")+ "\apks\DropCarOwner-STAGE-v2.1.0-rc.1.apk");
    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability("DeviceName","306SH");
    capabilities.setCapability("PlatformValue", "4.4.2");
    capabilities.setCapability("PlatformName", "Android");
    capabilities.setCapability("app",app.getAbsolutePath());
    driver= new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
}*/
@Test
public void Login() throws Exception{
    WebElement email= driver.findElement(By.id("com.dropcar.owner:id/editTextEmailAddress"));//com.dropcar.owner:id/editTextEmailAddress
    email.sendKeys("a","w","a","i","s","d","u","r","r","a","n","i","8","7","@","g","m","a","i","l",".","c","o","m");
    WebElement password= driver.findElement(By.id("com.dropcar.owner:id/editTextPassword"));  //com.dropcar.owner:id/editTextPassword
    password.sendKeys("c","h","e","c","k","i","n","g","1","2","3");
    WebElement check= driver.findElement(By.name("Remember me")); //com.dropcar.owner:id/checkBoxRememberMe
    driver.tap(0, check,0);
    //check.click();
    WebElement signIn=driver.findElement(By.name("SIGN IN"));
    driver.tap(1,signIn,1);
    //signIn.click();
    SC.Screenshot(driver);

}
@AfterTest
 public void end(){
    driver.quit();
}

 }

我正在使用Eclipse 4.4.1。如何解决此错误?

在运行脚本 appium-doctor 命令之前,请确保成功运行。如果您附上 appium 日志,那么告诉您问题的实际解决方案会更容易。

最新更新