The title say's almost all. What I have is short lived server processes that serves a web-based javascript test suite with optionally accompanying back-ends for integration tests (see [here](http://www2.openend.se/~pedronis/oejskit/doc/doc.html) for how it's done). I'm looking for a better way to direct the iPhone Emulator's Safari to the URL given.

More, possibly optional background:

Up until iOS SDK 4.0 I've managed to control XCode using AppleScript to start a specially prepared [PhoneGap](http://www.phonegap.com) project in this fashion:

1. AppleScript (referred to as "AS") starts XCode (referred to as "XC")
2. AS instructs XC to load the previously set up PhoneGap project.
3. AS instructs XC to launch the PhonePap project.
4. The PhoneGap project will redirect to the server serving the test suite, and the test suite runs.

In iOS 4.0 SDK, this only works the first round, the next time the test suite runner tries to make XC do the above routine, it fails requesting the previous run to be stopped. And I can't for the life of me find a way to stop the debugging session with AS [1], so I can only run one test suite without manual intervention, witch is pretty much a show stopper for us since we rely a lot on nightly test runs.

Now, what I *really* want to do is just start the iPhone Emulator, and then start Safari on the emulator with the possibility of sending an arbitrary URL to the emulated Safari.

What I've found so far is [iphonesim](http://github.com/jhaynie/iphonesim), but I'm running into [this](http://github.com/jhaynie/iphonesim/issues#issue/3) issue and can't get it to properly start pre-compiled apps. A way to circumvent this issue in `iphonesim` would also be a good way forward.

[1] I'd accept a way to do this as a valid answer too.