The carriage return should work... but possibly you are dispatching it before the Dialog is ready for input?
As a quick test, you might put a healthy artificial pause before the keystroke. For example:
- Code: Select all
ui.pause(3000); //wait 3 seconds --- TODO: replace with a condition!
How does this fare?
Also, do you know when this dialog will show up or is it unpredictable?