I am trying to close the Android emulator using the telnet command through the Appium script, but after running the telnet command, waiting for manual input for the kill command. Failed to execute the Kill command with the Appium script.
Runtime.getRuntime().exec("telnet localhost 5554");
Process proc= Runtime.getRuntime().exec("kill");
BufferedReader r = new BufferedReader(new InputStreamReader(proc.getInputStream()));
System.out.println("executed3");
String line;
while (true) {
line = r.readLine();
if (line == null) { break; }
System.out.println(line);
}
source
share