Added sleepFirst parameter in waitForDialogToOpen()
Set waitForDialog to not sleep in clickOnMenuItem()