java 代码:

import org.openqa.selenium.remote.DesiredCapabilities;
import org.python.modules.time.Time;
import org.testng.annotations.Test;
import tms.common.PdaAppCommon;
import org.openqa.selenium.By;
import java.net.URL;

public class pdaTransTest extends PdaAppCommon {
    AndroidDriver driver;
    @Test
    public void loginTest() throws Exception {
        DesiredCapabilities cap=new DesiredCapabilities();
        cap.setCapability("automationName", "Appium");
        cap.setCapability("deviceName", "9dad4f15");
        cap.setCapability("platformName", "Android");
//        cap.setCapability("platformVersion", "6.1");
//        cap.setCapability("udid", "192.168.56.101:5555");
        cap.setCapability("appPackage"," com.jollycorp.android.express");
        cap.setCapability("appActivity",".ui.other.loading.ActivityLoading");
        cap.setCapability("unicodeKeyboard", "True");
        cap.setCapability("resetKeyboard", "True");
        driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),cap);
        Time.sleep(3);
    }


}

运行 case 的时候报错:

机子上也安装了 unclock。apk 和 setting.apk

请教下各位应该怎么解决


↙↙↙阅读原文可查看相关链接,并与作者交流