&#34;主&#34; java.lang.NoSuchMethodError:org.openqa.selenium.remote.ErrorHandler。<init> -Appium

时间:2015-06-17 14:10:14

标签: java selenium-webdriver appium

我最近开始使用appium进行iOS编程,当我执行下面提到的脚本时

package com.OSsample.test;

import java.net.URL;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.ios.IOSDriver;
import java.net.MalformedURLException;
import java.util.concurrent.TimeUnit;
public class sampleiOS 
{
    public static AppiumDriver driver;
    public static void main(String[] args) 
    {
        DesiredCapabilities cap = new DesiredCapabilities();
        cap.setCapability("appiumVersion", "1.4.1");
        cap.setCapability("platformName", "iOS");
        cap.setCapability("platformVersion", "8.3");
        cap.setCapability("deviceName", "iPhone 6");
        cap.setCapability("app", "Settings");
        try {
            driver = new IOSDriver(new URL("http://0.0.0.0:4723/driver/hub"), cap);
            driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
        } 
        catch (MalformedURLException e) 
        {

            e.printStackTrace();
        }

    }

}

我遇到了这个错误:

Exception in thread "main" java.lang.NoSuchMethodError: org.openqa.selenium.remote.ErrorHandler.<init>(Lorg/openqa/selenium/remote/ErrorCodes;Z)V
at io.appium.java_client.AppiumDriver.<clinit>(AppiumDriver.java:46)
at com.OSsample.test.sampleiOS.main(sampleiOS.java:21)

任何人都可以告诉我如何解决这个问题

0 个答案:

没有答案