Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » AGR does not recognize confirmation dialog
AGR does not recognize confirmation dialog [message #52691] Thu, 02 February 2006 22:42 Go to next message
stephanl is currently offline stephanlFriend
Messages: 13
Registered: July 2009
Junior Member
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
Re: AGR does not recognize confirmation dialog [message #52774 is a reply to message #52691] Fri, 03 February 2006 19:19 Go to previous message
No real name is currently offline No real nameFriend
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
>
>
Previous Topic:Missing execution statistics??
Next Topic:more on: AGR does not recognize confirmation dialog
Goto Forum:
  


Current Time: Thu Apr 25 23:17:46 GMT 2024

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

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

Back to the top