|
Re: AGR does not recognize confirmation dialog [message #52774 is a reply to message #52691] |
Fri, 03 February 2006 19:19 |
No real name Messages: 404 Registered: July 2009 |
Senior Member |
|
|
Hi Stephan,
Yes, you're right. The MessageBox is a native dialog, but MessageDialog
isn't.
You can use a message dialog as follows:
MessageDialog md = new MessageDialog
(HelloWorldPlugin.getDefault().getWorkbench().getActiveWorkb enchWindow().get
Shell(), "Title", null, "Message", MessageDialog.NONE, new String[]{"Yes",
"No"}, 0);
return md.open() == 0;
Unfortunately I can't think of any other workarounds that you can use
without the need to change your code.
Thanks.
"Stephan Lips" <stephan.lips@gmail.com> wrote in message
news:dru1sg$e92$1@utils.eclipse.org...
> Greetings,
>
> we use using AGR/TPTP 4.1 in Eclipse 3.1. A scenario I am automating
> involves a simple confirmation dialog that is invoked by the plugin under
> test as follows
> MessageBox replicate = new MessageBox(getShell(), SWT.YES | SWT.NO);
> replicate.setMessage(REP_MSG_1);
> replicate.setText(REP_MSG_2);
> return replicate.open() == SWT.YES;
> When recording the scenario, AGR fails to recognize the replicate
> dialog/record any interaction with it, subsequent test execution fails
with
> the message 'Timeout occured [...] This is likely caused by the presence
of
> an unexpected dialog'.
>
> Is the SWT MessageBox a 'native' dialog as described in the AGR manual,
> section 1.2 'Known Limitations and Workarounds', and/or is there any
> workaround? I would like to think that simple yes/no confirmation dialogs
> such as the one I am looking at are a pretty common occurence and there is
a
> way to make AGR work with it.
>
> Thanks much for any insight!
>
> - Stephan
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03335 seconds