0

I have to run some test suite on two remote machines.

So, after one suite, i reset the app and for the next suite, app starts well.

But the problem is, after completing the total execution

driver.quit() 

just close the app but it does not close the simulator as

no reset is true.

So, is there a way to close the xcode simulator using appium or selenium? I do not want to use ssh and full reset option.

I also do not want to use

killall "Simulator" as it needs ssh connection.
Gaurav
  • 1,332
  • 11
  • 22
Eric Ipsum
  • 723
  • 3
  • 10
  • 24

2 Answers2

0

try this

 String closesim[] = {"killall","iOS Simulator"};
        Runtime.getRuntime().exec(closesim);
karthick23
  • 1,313
  • 1
  • 8
  • 15
0

You can try directly close simulator by passing below code in you AfterClass,Or AfterSuit method . which close all the simulator which is open in system.

For my case its working i am not sure in your cases its work because if you pass below command in terminal you can find its close your simulator.

runtime.exec("xcrun simctl shutdown all");