下面的代码用于在 appium 中启动应用程序,但我无法使用 wifi 远程启动应用程序。但是当我检查 adb 设备时,它已连接到手机。运行脚本后,它无法在 adb 中连接设备。它会杀死服务器
public class TestLauncher
{
public static void main(String[] args) throws MalformedURLException
{
AppiumDriver driver;
DesiredCapabilities capabilities=new DesiredCapabilities();
capabilities.setCapability("noReset","true");
capabilities.setCapability("fullReset","false");
capabilities.setCapability("udid","192.168.1.163:5555");
capabilities.setCapability("deviceName","SWIPE ELITE");
capabilities.setCapability("platformName","Android");
capabilities.setCapability("platformVersion","5.0.2");
capabilities.setCapability("browserName","");
File file = new File("/home/nishant/APK/SoftController","com.x18thparallel.softcontroller-msg_support_wo_ime_change-vA.3.219.apk");
capabilities.setCapability("app",file.getAbsolutePath());
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
}
}