Replaced solo sleep() with waitForDialogToClose() after a test failed because we didn't wait long enough. Perhaps we should use this more often.