I'm needing to wait for a dialog box to appear before continuing. Whats the best way to wait for dialog box to appear?