Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Testing a dialog with Browse button > DirectoryDialog
Testing a dialog with Browse button > DirectoryDialog [message #1719335] Thu, 07 January 2016 10:38 Go to next message
Stephan Druskat is currently offline Stephan DruskatFriend
Messages: 102
Registered: October 2011
Location: Berlin, Germany
Senior Member

I'm trying to test a dialog with a Browse button which opens a DirectoryDialog.

I know that SWTBot is not able to test native dialogs, but can someone confirm that this fact is the root cause for the following behaviour, please?

I'm doing bot.button("Browse").click(), the DirectoryDialog opens, and the test stalls because I cannot address the DirectoryDialog.

If this is expected behaviour, is there any assertion beyond assertVisible(bot.button("Browse...")) that makes sense for testing the button?
Re: Testing a dialog with Browse button > DirectoryDialog [message #1721836 is a reply to message #1719335] Sun, 31 January 2016 21:46 Go to previous message
Mickael Istria - away until August 14th is currently offline Mickael Istria - away until August 14thFriend
Messages: 832
Registered: July 2009
Location: Grenoble, France
Senior Member

On 01/07/2016 11:38 AM, Stephan Druskat wrote:
> I'm doing bot.button("Browse").click(), the DirectoryDialog opens, and
> the test stalls because I cannot address the DirectoryDialog.

Yes, I confirm that. Since SWTBot cannot interact with the dialog, the
dialog remains open and the test stalls.

> If this is expected behaviour

Not really the expected one, but the current one available at the
moment. If you find any idea to handle that, discussion would be highly
welcome on a bugzilla ticket!

> is there any assertion beyond
> assertVisible(bot.button("Browse...")) that makes sense for testing the
> button?

There is no good solution without modifying the application code to
behave a bit differently (with a dummy non-native dialog) in case of UI
tests.

--
Mickael Istria
My job: http://www.jboss.org/tools
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Previous Topic:Not able to detect Combo box with org.eclipse.jface.fieldassist.SimpleContentProposalProvider
Next Topic:drag and drop from FigureCanvas
Goto Forum:
  


Current Time: Sun Sep 23 04:55:36 GMT 2018

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

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

Back to the top