Running tests Safari using the SafariLauncher app

This solution allows you to run tests against safari <b>without any delay</b> using the SafariLauncher app.

It catches the instruments connection timeout (decreased to speed up test execution) and returns an all OK, which allows the test to continue. When stopping the test it closes the remote debugger connection and cleans up.

I was able to run multiple consecutive tests using safari without any issues and quite speedy as well ;).

<b>Steps</b>:
1. Clone the <a href="github.com/budhash/SafariLauncher">SafariLauncher App</a> and change the delay to be 0.
2. Deploy the app to your device and take a reference to the app in derived data (and set that as app).
3. The code looks for this app and has certain catches in place (e.g. when instruments times out)
4. Write a script that launches the app (which then launches safari) and in the second step just switch to the web view and your off.

<b>Note:</b> safari is left open after the test. Anyway of closing it? I tried javascript "window.close()" but that didn't work. You can however clear all cookies to clear the previous session.