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.<
我可以MessageDialog.openInformation(....)
创建一个 MessageDialog,但我将测试单击“是”或“否”时会发生什么。我试图将 der MessageDialog 中的“是”和“否”按钮解释为按钮。
okButton = bot.button("Yes");
但是我得到一个“org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException:找不到小部件。”
我可以测试谁?