The Message box is a native dialog. SWT does not have support to recognize native dialogs, and SWTBot therefore cannot test them. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=164192 for more info.
Cheers, Ketan Padegaonkar, I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse On 10-Jun-08, at 4:43 PM, Hans Schwaebli wrote: > I use the example "org.eclipse.swt.examples.addressbook.AddressBook" > for testing SWT Bot. > > How can I click the OK button on that image: > http://img142.imageshack.us/img142/2909/okbuttonar1.gif > > If I write "bot.button("OK").click();" this exception occurs: > > net.sf.swtbot.widgets.WidgetNotFoundException: Could not find widget > with text OK > at > net.sf.swtbot.widgets.AbstractSWTBot.<init>(AbstractSWTBot.java:127) > at net.sf.swtbot.widgets.SWTBotButton.<init>(SWTBotButton.java:46) > at net.sf.swtbot.SWTBot.button(SWTBot.java:191) ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ SWTBot-users mailing list SWTBot-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/swtbot-users http://swtbot.org/ - a functional testing tool for SWT/Eclipse