An unknown server-side error occurred while processing the command. Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.


package com.android.app;
import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.remote.MobileCapabilityType;

public class mobileAutomation {
    public static void main(String[] args) throws MalformedURLException {
        // TODO Auto-generated method stub
        DesiredCapabilities dcap = new DesiredCapabilities();
        dcap.setCapability(MobileCapabilityType.DEVICE_NAME, "emulator-5554");
        dcap.setCapability("appPackage", "com.microsoft.teams");
        dcap.setCapability("appActivity", "com.microsoft.skype.teams.Launcher");
        dcap.setCapability("noReset", "true");
        //dcap.setCapability("automationName", "UiAutomator1");
        AndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL(""), dcap);



1 Answer 1


use UiAutomator2 and incluse Android Version


also make sure appium server is started before running your tests

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.