Cannot instantiate the type AppiumDriver Cannot instantiate the type AppiumDriver selenium selenium

Cannot instantiate the type AppiumDriver


You don't need to downgrade or anything. There is a design change in the Java Client version 2.0.0 as they mention on their site:

AppiumDriver is now an abstract class, use IOSDriver and AndroidDriver which both extend it.

So, just change your driver line to be:

dr = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);

Hope that helps...


This error can be fixed by downgrading the Appium Client(see step 1 in my question) from latest to java-client-1.5.0. You can keep rest of the jars to latest.

Downgraded version of Appium Client can be downloaded from here http://mvnrepository.com/artifact/io.appium/java-client/1.5.0


WebDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),getDesiredCapabilities("192.21.168.56:5555"));

use this. and import:

import io.appium.java_client.AppiumDriver;import io.appium.java_client.android.AndroidDriver;