Michelle Davidson wrote:
> In my RCP I have some MessageDialogs and some Dialogs which extend the
> Class TitleAreaDialog.
> Now I have read, that there is no chance to test native dialogs.
> Are TitleAreaDialogs nativeDialogs too?
> And how can I test the messagedialog or what can I do to close the
> messageDialog with ok or cancel?
Message dialogs are not native dialogs. A good example of a native
dialog is a file chooser: it is the same in eclipse then anywhere else
in your OS.
To test a message dialog, simply search for a shell with the appropriate
title: SWTBot#shell(String). Then, search anything you need inside that
SWTBotShell shell = bot.shell("foo");
SWTBot childBot = new SWTBot(shell.widget);