简体   繁体   中英

Appium-JAVA Error: unable to load class 'org.eclipse.ui.internal.ide.application.addons.ModelCleanupAddon' from bundle '731'

stacktrace screenshot I am trying to run different tests that I have written, through Appium on an Android device, but I am getting the following errors:

unable to load class 'org.eclipse.ui.internal.ide.application.addons.ModelCleanupAddon' from bundle '731'

or

unable to load class 'org.eclipse.ui.internal.ide.application.addons.ModelCleanupAddon' from bundle '561'

My code is:

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();
}


 }

I am using Eclipse 4.4.1. How can I resolve this error?

Make sure before running the script appium-doctor command is working successfully. If you will attach the appium log then it will be more easy to tell you the actual solution of your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM