Support of MessageDialog [message #488578] |
Tue, 29 September 2009 10:39 |
Werner Hihn Messages: 32 Registered: July 2009 |
Member |
|
|
Hi Ketan, hi community,
first of all, thanks a lot for your great work. I started using SWTBot some months ago, and managed to test nearly everything I wanted in our eclipse based application, not least with the help of this community.
One thing I stumbled upon now, is the JFace MessageDialog...
I read a statement of yours [1] where you are saying the MessageDialog is not supported yet, another statement of Ketan Patel was that this should work using bot.shell("Title") [2].
Could you please tell me what' s the current state here? For me it' s not working, there' s no timeout, the test simply freezes as soon as the MessageDialog is displayed.
If there is no support for MessageDialog yet, would it speed up things, to file a bug for this?
Thanks in advance,
Werner
[1] - http://ketan.padegaonkar.name/2007/11/14/another-sneak-previ ew-into-swtbot.html
[2] - http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.swtbot /msg00492.html
|
|
|
|
Re: Support of MessageDialog [message #496734 is a reply to message #496716] |
Wed, 11 November 2009 08:48 |
Werner Hihn Messages: 32 Registered: July 2009 |
Member |
|
|
Daniel,
thanks for your answer. Your snippet works fine for me, too. But when
I'm trying to access a MessageDialog opened from within my Application,
it still fails. I'll try to find out what' s the difference here..
btw, I'm using SWTBot 2.0.0.433-dev-e35 with an application based on
Eclipse Galileo.
Regards,
Werner
Daniel Weber schrieb:
> Hi Werner,
>
> this snippet runs just fine:
>
> @Test
> public void msgDialog() throws Exception {
> bot.activeShell().display.asyncExec(new Runnable() {
> public void run() {
> MessageDialog.openConfirm(bot.activeShell().widget, "A
> MessageDialog", "Buhu");
> }
> });
> bot.shell("A MessageDialog").activate();
> bot.sleep(5000);
> bot.button("OK").click();
> }
>
> SWTBot currently cannot support native dialogs (see [1], [2] and [3]),
> e.g. SWT's FileDialog and ColorDialog.
> org.eclipse.jface.dialogs.MessageDialog however is not one of them and
> can therefore be properly supported by SWTBot (in jface 3.5.0, shipped
> with Eclipse Galileo). Maybe this was different back in 2007. Or Ketan
> actually meant org.eclipse.swt.widgets.MessageBox, which still creates a
> native dialog.
>
> Regards,
> Daniel
>
> [1] - https://bugs.eclipse.org/bugs/show_bug.cgi?id=283609
> [2] - https://bugs.eclipse.org/bugs/show_bug.cgi?id=292953
> [3] - https://bugs.eclipse.org/bugs/show_bug.cgi?id=164192
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03365 seconds