[英]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: stacktrace屏幕截图我试图在Android设备上通过Appium运行我编写的其他测试,但是出现以下错误:
unable to load class 'org.eclipse.ui.internal.ide.application.addons.ModelCleanupAddon' from bundle '731'
无法从捆绑包'731'加载类'org.eclipse.ui.internal.ide.application.addons.ModelCleanupAddon'
or 要么
unable to load class 'org.eclipse.ui.internal.ide.application.addons.ModelCleanupAddon' from bundle '561'
无法从包“ 561”中加载类“ org.eclipse.ui.internal.ide.application.addons.ModelCleanupAddon”
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. 我正在使用Eclipse 4.4.1。 How can I resolve this error?
如何解决此错误?
Make sure before running the script appium-doctor command is working successfully. 在运行脚本appium-doctor命令之前,请确保已成功运行。 If you will attach the appium log then it will be more easy to tell you the actual solution of your problem.
如果您将附上appium日志,那么将更容易告诉您问题的实际解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.