How to close programmatically appium 1.6 server after test (IOS - XCUITEST) - URGENT

I am stuck on this issue for a long time…
I posted a message here a while a go…with no comments…

Just to clarify, I am talking about the appium server, not the driver…


how you start appium?

service = new AppiumServiceBuilder().withIPAddress("").build();

String[] command1 = {“sh”, “-c”, “ps aux | grep ‘port “+strAppiumPort+”’ | grep -v grep | awk ‘{print $2}’ | xargs kill -9”};
try {Runtime.getRuntime().exec(command1);
System.out.println(“Appium server stopped. Port(”+strAppiumPort+")");}catch (IOException e) {e.printStackTrace();}

Thanks dduphorn
It looks like it solved the issue :slight_smile:

1 Like