0

Is the message box native SWT? I ask, because SWTBot can't handle native SWT dialogs like message boxes or file dialogs.
Suggestion: work in your application code with (JFace) MessageDialog.openInformation(....) and not nativ SWT dialogs. This works fine with SWTBot.<

I can with MessageDialog.openInformation(....) create a MessageDialog, but I will testing what happens when I click "Yes" or "No". I tried to interpreted the "Yes" and "No" Buttons in der MessageDialog as Buttons.

okButton = bot.button("Yes");

However I get a "org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException: Could not find widget."

Who I can test it?

1 Answers1

0

You cannot test the native dialog with SWTBot.

Reference: SWTBot Wiki

Saminathan S
  • 325
  • 2
  • 11