script for waiting until emulator is loaded