May 1, 2006

Using {Ctrl-C} to Copy Error Dialog Text to the Clipboard

Did you know that you can use {Ctrl-C} to capture the text of some error dialogs to the clipboard?

Try this:
  • Start Notepad
  • Type some text
  • Select File, Exit from the menu
  • When the confirmation dialog appears, hold down the Ctrl key and press C
  • Click the Cancel button to cancel the Exit
  • Select Edit, Paste from the menu
You should see something like this:
---------------------------
Notepad
---------------------------
The text in the Untitled file has changed.

Do you want to save the changes?
---------------------------
Yes   No   Cancel  
---------------------------
I use this technique to easily copy error messages into my bug reports.
I also use this technique in some of my Test Automation Scripts.