Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » [AGR] Problem with multiple 'similar' Widgets
[AGR] Problem with multiple 'similar' Widgets [message #110519] Tue, 28 August 2007 10:56 Go to next message
Eclipse User
Originally posted by: gautamh.aztecsoft.com

Hi,

I'm using AGR feature of TPTP to test a plugin I'm developing.

Let's consider a hypothetical case, that I'm building a wizard plugin,
which has two browse buttons (Browse-1 and Browse-2).

Use case scenarios is that, when I select the button Browse-1, he pops up
a dialog window which lists a set of resource "X" and when I select
Browse-2, he pops up another dialog window which lists different set of
resource "Y".

I recorded the following actions with options set to "Register object ids
with object mine"

And the outcome was something like :

<command descriptive="Browse..." type="select" referenceId="9"/>
<shell descriptive="Folder Selection" referenceId="10" return-code="0">
<command descriptive="src" type="item-select" referenceId="11">
<item referenceId="12"/>
</command>
<command type="focus" referenceId="11"/>
<command descriptive="OK" type="select" referenceId="15"/>
</shell>
<command descriptive="Browse..." type="select" referenceId="9"/>
<shell descriptive="Type Browser Selection" referenceId="17"
return-code="0">
<command descriptive="eclpise.test.file1" type="item-select"
referenceId="19">
<item referenceId="20"/>
</command>
<command descriptive="OK" type="select" referenceId="21"/>
</shell>

If you observe carefully, you'll notice that the first Browse button
(Browse-1) pops "Folder Selection" dialog and second Browse button
(Browse-2) pops "Type Browser Selection".

You'll also notice that both the "Browse" buttons have the same
"refernceId" whose value is "9", ie 'referenceId="9"'.

Now once the recording is completed, if I try replaying it that's when the
problem creeps in. The first "Browse" button does exactly as expected,
pops "Folder Selection", but when the second "Browse" button is selected
surprisingly it pops up "Folder Selection" dialog instead of "Type Browser
Selection" dialog.

My guess is, this happens cause of the "referenceId". I've over come this
by manually typing in the values, at this point what I'm interested in
knowing is, that if there is any way I can over come this without going
the manual-typing way, or any precautions/steps I need to take/follow to
ensure I pass this situation successfully.

Any help on this is much appreciated.

Regards,
~Gautam
Re: [AGR] Problem with multiple 'similar' Widgets [message #110556 is a reply to message #110519] Tue, 28 August 2007 14:26 Go to previous messageGo to next message
Liz Dancy is currently offline Liz Dancy
Messages: 77
Registered: July 2009
Member
Hi Gautam,

You are running into a known problem which is being tracked here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=171083

There are various workarounds but all involve some editing on your part. You
can use your above solution or you can change the way the widget in question
is resolved by creating your own widget resolver. For more info on the
widget resolving mechanisms used, please see:
http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-4-0.html.

Please feel free to also add yourself to the CC list of the above defect.

Sincerely,

Liz Dancy




"Gautam" <gautamh@aztecsoft.com> wrote in message
news:ef73cc29643f7c26fb559bd5d3a094c8$1@www.eclipse.org...
> Hi,
>
> I'm using AGR feature of TPTP to test a plugin I'm developing.
>
> Let's consider a hypothetical case, that I'm building a wizard plugin,
> which has two browse buttons (Browse-1 and Browse-2).
>
> Use case scenarios is that, when I select the button Browse-1, he pops up
> a dialog window which lists a set of resource "X" and when I select
> Browse-2, he pops up another dialog window which lists different set of
> resource "Y".
> I recorded the following actions with options set to "Register object ids
> with object mine"
> And the outcome was something like :
>
> <command descriptive="Browse..." type="select" referenceId="9"/>
> <shell descriptive="Folder Selection" referenceId="10" return-code="0">
> <command descriptive="src" type="item-select" referenceId="11">
> <item referenceId="12"/>
> </command>
> <command type="focus" referenceId="11"/>
> <command descriptive="OK" type="select" referenceId="15"/>
> </shell>
> <command descriptive="Browse..." type="select" referenceId="9"/>
> <shell descriptive="Type Browser Selection" referenceId="17"
> return-code="0">
> <command descriptive="eclpise.test.file1" type="item-select"
> referenceId="19">
> <item referenceId="20"/>
> </command>
> <command descriptive="OK" type="select" referenceId="21"/>
> </shell>
>
> If you observe carefully, you'll notice that the first Browse button
> (Browse-1) pops "Folder Selection" dialog and second Browse button
> (Browse-2) pops "Type Browser Selection".
>
> You'll also notice that both the "Browse" buttons have the same
> "refernceId" whose value is "9", ie 'referenceId="9"'.
>
> Now once the recording is completed, if I try replaying it that's when the
> problem creeps in. The first "Browse" button does exactly as expected,
> pops "Folder Selection", but when the second "Browse" button is selected
> surprisingly it pops up "Folder Selection" dialog instead of "Type Browser
> Selection" dialog.
>
> My guess is, this happens cause of the "referenceId". I've over come this
> by manually typing in the values, at this point what I'm interested in
> knowing is, that if there is any way I can over come this without going
> the manual-typing way, or any precautions/steps I need to take/follow to
> ensure I pass this situation successfully.
>
> Any help on this is much appreciated.
>
> Regards,
> ~Gautam
>
Re: [AGR] Problem with multiple 'similar' Widgets [message #110654 is a reply to message #110556] Wed, 29 August 2007 07:45 Go to previous messageGo to next message
Eclipse User
Originally posted by: gautamh.aztecsoft.com

Lizy,

Being new to TPTP, I have problems figuring it out.

Let's say,
Browse-1 pops up a dialog "com.self.test.TypeSelectionDialog"

and

Browse-2 pops up "com.self.test.ContainerSelectionDialog"


How do I go about writing the Adaptive Widget Resolver for this, and do I
need to make any changes in the Macro after writing the widget ?

Couldn't quite get to were I wanted from the example given at
http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI.html#2.4.1

Thanks for your time and help.

Regards,
~Gautam
Re: [AGR] Problem with multiple 'similar' Widgets [message #110827 is a reply to message #110654] Thu, 30 August 2007 21:42 Go to previous message
Liz Dancy is currently offline Liz Dancy
Messages: 77
Registered: July 2009
Member
Hi Gautam,

You can start by taking a look at our two custom widget resolvers in our
code base:
org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
and
org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver

Instructions for checking out the AGR code from our CVS repository can be
found in
Section 0.3 'Obtaining Source Code' of:

http://www.eclipse.org/tptp/test/documents/design/agr-arch/I ntro-Auto-GUI-4-3-0.html

I hope this is what you are looking for. Feel free to post back if you run
into any problems.

Sincerely,

Liz Dancy

"Gautam" <gautamh@aztecsoft.com> wrote in message
news:374f5b02a7e6a21f9ab3f055a2836bf3$1@www.eclipse.org...
> Lizy,
>
> Being new to TPTP, I have problems figuring it out.
>
> Let's say, Browse-1 pops up a dialog "com.self.test.TypeSelectionDialog"
>
> and
> Browse-2 pops up "com.self.test.ContainerSelectionDialog"
>
>
> How do I go about writing the Adaptive Widget Resolver for this, and do I
> need to make any changes in the Macro after writing the widget ?
>
> Couldn't quite get to were I wanted from the example given at
> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI.html#2.4.1
>
> Thanks for your time and help.
>
> Regards,
> ~Gautam
>
Previous Topic:Missing Constraint: Require-Bundle... for org.eclipse.tptp.platform.profile.server.wst
Next Topic:NullPointerException from TestSuitesTabularPublicationService class
Goto Forum:
  


Current Time: Sun Sep 21 08:08:14 GMT 2014

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

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