Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Can I test Dialogs in swtbot
Can I test Dialogs in swtbot [message #485054] Thu, 10 September 2009 11:52 Go to next message
Michelle Davidson is currently offline Michelle DavidsonFriend
Messages: 41
Registered: August 2009
Member
Hello,

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?
Re: Can I test Dialogs in swtbot [message #485064 is a reply to message #485054] Thu, 10 September 2009 12:54 Go to previous message
Pascal G is currently offline Pascal GFriend
Messages: 157
Registered: July 2009
Senior Member
Michelle Davidson wrote:
> Hello,
>
> 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
shell:
SWTBotShell shell = bot.shell("foo");
SWTBot childBot = new SWTBot(shell.widget);
childBot.button();
etc.

Hope this helps.
--
Pascal Gélinas | Software Developer
*Nu Echo Inc.*
http://www.nuecho.com/ | http://blog.nuecho.com/

*Because performance matters.*
Previous Topic:SWTBot test case as Eclipse Product
Next Topic:Blank screen while running SWTBot tests
Goto Forum:
  


Current Time: Wed Apr 24 15:09:44 GMT 2024

Powered by FUDForum. Page generated in 0.03584 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top