I am trying to close Android emulator using telnet command via Appium script but after executing the telnet command waiting for manual input for "kill" command. Unable to execute the "Kill" command along with 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);
}
This command line use for close the emulator automatically via appium script.
Runtime.getRuntime().exec("tskill emulator-arm");
use this code
tskill emulator-arm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With