Skip to content

MobileElement not exist in java-client 8.0.0

I can’t find a way to import MobileElement for code I copy after following this guide: in Appium for testing Android.

import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.MobileElement;

public class Test {
    public static void main(String args[]){
        MobileElement el3 = (MobileElement) driver.findElementById("com.example.calculator:id/button2");;
        MobileElement el4 = (MobileElement) driver.findElementById("com.example.calculator:id/button5");;
        MobileElement el5 = (MobileElement) driver.findElementById("com.example.calculator:id/buttonPlus");;
        MobileElement el6 = (MobileElement) driver.findElementById("com.example.calculator:id/button3");;
        MobileElement el7 = (MobileElement) driver.findElementById("com.example.calculator:id/button9");;


But the recorded code has MobileElement, so I do the same by downloading libraries from this site:

This is my library which was downloaded from

But later, it showed me that it doesn’t have MobileElement library, so I can’t import it.

Cannot resolve symbol ‘MobileElement’

Is it because the code is old or does the library have an update that I don’t know?



I am doing the same thing. My solution is to switch to released java-client, not the beta version.

implementation files('libs\java-client-7.6.0.jar')

Good luck