Error
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.
Code:
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 {
@SuppressWarnings("unused")
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(MobileCapabilityType.PLATFORM_NAME,"android");
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("http://127.0.0.1:4723/wd/hub"), dcap);
}
}