To wait for b2g desktop to finish loading... it's a hack though. Elsewhere we use https://github.com/mozilla-b2g/marionette-apps/blob/master/lib/bootwatcher.js