Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » AGR: how to get Position-dependent navigation
AGR: how to get Position-dependent navigation [message #105274] Tue, 17 July 2007 11:47 Go to next message
Eclipse User
Originally posted by: joel_patterson.verizon.net

I'm working with an Eclipse Tree/TreeItem where AGR is using the default
entry in widgetReg.xml (which is essentially the text in the item).

Example:
<command descriptive="ClassCastException (8)" type="item-select"
contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
widgetId="org.eclipse.swt.widgets.Tree#1">
<item path="{{Customer-addOrders(List) (52)-EXCEPTION
(18)-ClassCastException (8)}}-{{1.0}}"
resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
</command>

However, the text is not reliably repeatable, but the position in the
tree is. Is there a way to specify position by nodes? (i.e. I want
the third child of the first child of the root)

Thanks!
Joel
Re: how to get Position-dependent navigation [message #105319 is a reply to message #105274] Tue, 17 July 2007 12:27 Go to previous messageGo to next message
Liz Dancy is currently offline Liz Dancy
Messages: 77
Registered: July 2009
Member
Hi Joel,

If you wish to implement your own custom widget resolver you can do so and
then register it by using the extension point:
org.eclipse.tptp.test.auto.gui.widgetResolver.

There are two examples in our code base of custom widget resolvers to get
you started:

org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
and
org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver

Note that you must first declare a dependency on
org.eclipse.tptp.test.auto.gui.

Please let me know if I can be of further assistance.

Sincerely,

Liz Dancy

"Joel Patterson" <joel_patterson@verizon.net> wrote in message
news:f7ioaj$mn$1@build.eclipse.org...
> I'm working with an Eclipse Tree/TreeItem where AGR is using the default
> entry in widgetReg.xml (which is essentially the text in the item).
>
> Example:
> <command descriptive="ClassCastException (8)" type="item-select"
> contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
> widgetId="org.eclipse.swt.widgets.Tree#1">
> <item path="{{Customer-addOrders(List) (52)-EXCEPTION
> (18)-ClassCastException (8)}}-{{1.0}}"
> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
> </command>
>
> However, the text is not reliably repeatable, but the position in the tree
> is. Is there a way to specify position by nodes? (i.e. I want the
> third child of the first child of the root)
>
> Thanks!
> Joel
Re: how to get Position-dependent navigation [message #105378 is a reply to message #105319] Tue, 17 July 2007 17:08 Go to previous messageGo to next message
Eclipse User
Originally posted by: joel_patterson.verizon.net

The download from eclipse.org seems to be giving me the 4.3 version....

org\eclipse\tptp\test\auto\gui\internal\resolvers\NonTrivial WidgetResolver
is what I'm seeing in the jar.

Have I gone to the wrong place?

Is there some detailed instructions or an example of how to do this?
I'm brand-new to TPTP.

Liz Dancy wrote:
> Hi Joel,
>
> If you wish to implement your own custom widget resolver you can do so and
> then register it by using the extension point:
> org.eclipse.tptp.test.auto.gui.widgetResolver.
>
> There are two examples in our code base of custom widget resolvers to get
> you started:
>
> org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
> and
> org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver
>
> Note that you must first declare a dependency on
> org.eclipse.tptp.test.auto.gui.
>
> Please let me know if I can be of further assistance.
>
> Sincerely,
>
> Liz Dancy
>
> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
> news:f7ioaj$mn$1@build.eclipse.org...
>> I'm working with an Eclipse Tree/TreeItem where AGR is using the default
>> entry in widgetReg.xml (which is essentially the text in the item).
>>
>> Example:
>> <command descriptive="ClassCastException (8)" type="item-select"
>> contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
>> widgetId="org.eclipse.swt.widgets.Tree#1">
>> <item path="{{Customer-addOrders(List) (52)-EXCEPTION
>> (18)-ClassCastException (8)}}-{{1.0}}"
>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
>> </command>
>>
>> However, the text is not reliably repeatable, but the position in the tree
>> is. Is there a way to specify position by nodes? (i.e. I want the
>> third child of the first child of the root)
>>
>> Thanks!
>> Joel
>
>
Re: how to get Position-dependent navigation [message #105392 is a reply to message #105378] Tue, 17 July 2007 17:31 Go to previous messageGo to next message
Liz Dancy is currently offline Liz Dancy
Messages: 77
Registered: July 2009
Member
Hi Joel,

You can ensure you have the latest version by checking your Eclipse install
under Help > About Eclipse SDK > Feature Details >Click on 'TPTP Automated
GUI Recording and Playback' and check the Build ID (shown below). It should
begin with TPTP-4.4 if this is the build you downloaded.

Don't worry about the versioning numbers on the plugin itself.

For more information on the Adaptive Widget Resolver and the AGR in general,
including examples, please see:
http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-4-0.html#2.4.

Section 2.4.1 may be of particular interest to you.

Sincerely,

Liz Dancy

"Joel Patterson" <joel_patterson@verizon.net> wrote in message
news:f7jb3n$uk9$1@build.eclipse.org...
> The download from eclipse.org seems to be giving me the 4.3 version....
>
> org\eclipse\tptp\test\auto\gui\internal\resolvers\NonTrivial WidgetResolver
> is what I'm seeing in the jar.
>
> Have I gone to the wrong place?
>
> Is there some detailed instructions or an example of how to do this? I'm
> brand-new to TPTP.
>
> Liz Dancy wrote:
>> Hi Joel,
>>
>> If you wish to implement your own custom widget resolver you can do so
>> and then register it by using the extension point:
>> org.eclipse.tptp.test.auto.gui.widgetResolver.
>>
>> There are two examples in our code base of custom widget resolvers to get
>> you started:
>>
>> org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
>> and
>> org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver
>>
>> Note that you must first declare a dependency on
>> org.eclipse.tptp.test.auto.gui.
>>
>> Please let me know if I can be of further assistance.
>>
>> Sincerely,
>>
>> Liz Dancy
>>
>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>> news:f7ioaj$mn$1@build.eclipse.org...
>>> I'm working with an Eclipse Tree/TreeItem where AGR is using the default
>>> entry in widgetReg.xml (which is essentially the text in the item).
>>>
>>> Example:
>>> <command descriptive="ClassCastException (8)" type="item-select"
>>> contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
>>> widgetId="org.eclipse.swt.widgets.Tree#1">
>>> <item path="{{Customer-addOrders(List) (52)-EXCEPTION
>>> (18)-ClassCastException (8)}}-{{1.0}}"
>>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
>>> </command>
>>>
>>> However, the text is not reliably repeatable, but the position in the
>>> tree is. Is there a way to specify position by nodes? (i.e. I want
>>> the third child of the first child of the root)
>>>
>>> Thanks!
>>> Joel
>>
Re: how to get Position-dependent navigation [message #105406 is a reply to message #105392] Tue, 17 July 2007 18:58 Go to previous messageGo to next message
Eclipse User
Originally posted by: joel_patterson.verizon.net

OK, the build was 4.4, thanks.

I've gotten the Adaptive Widget Resolver to work correctly (although it
does need the reboot as you mentioned) but looks like I need to create a
custom resolver.

2.4.1 doesn't address that -- is there an example of how to do that
somewhere?

Liz Dancy wrote:
> Hi Joel,
>
> You can ensure you have the latest version by checking your Eclipse install
> under Help > About Eclipse SDK > Feature Details >Click on 'TPTP Automated
> GUI Recording and Playback' and check the Build ID (shown below). It should
> begin with TPTP-4.4 if this is the build you downloaded.
>
> Don't worry about the versioning numbers on the plugin itself.
>
> For more information on the Adaptive Widget Resolver and the AGR in general,
> including examples, please see:
> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-4-0.html#2.4.
>
> Section 2.4.1 may be of particular interest to you.
>
> Sincerely,
>
> Liz Dancy
>
> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
> news:f7jb3n$uk9$1@build.eclipse.org...
>> The download from eclipse.org seems to be giving me the 4.3 version....
>>
>> org\eclipse\tptp\test\auto\gui\internal\resolvers\NonTrivial WidgetResolver
>> is what I'm seeing in the jar.
>>
>> Have I gone to the wrong place?
>>
>> Is there some detailed instructions or an example of how to do this? I'm
>> brand-new to TPTP.
>>
>> Liz Dancy wrote:
>>> Hi Joel,
>>>
>>> If you wish to implement your own custom widget resolver you can do so
>>> and then register it by using the extension point:
>>> org.eclipse.tptp.test.auto.gui.widgetResolver.
>>>
>>> There are two examples in our code base of custom widget resolvers to get
>>> you started:
>>>
>>> org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
>>> and
>>> org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver
>>>
>>> Note that you must first declare a dependency on
>>> org.eclipse.tptp.test.auto.gui.
>>>
>>> Please let me know if I can be of further assistance.
>>>
>>> Sincerely,
>>>
>>> Liz Dancy
>>>
>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>> news:f7ioaj$mn$1@build.eclipse.org...
>>>> I'm working with an Eclipse Tree/TreeItem where AGR is using the default
>>>> entry in widgetReg.xml (which is essentially the text in the item).
>>>>
>>>> Example:
>>>> <command descriptive="ClassCastException (8)" type="item-select"
>>>> contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
>>>> widgetId="org.eclipse.swt.widgets.Tree#1">
>>>> <item path="{{Customer-addOrders(List) (52)-EXCEPTION
>>>> (18)-ClassCastException (8)}}-{{1.0}}"
>>>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
>>>> </command>
>>>>
>>>> However, the text is not reliably repeatable, but the position in the
>>>> tree is. Is there a way to specify position by nodes? (i.e. I want
>>>> the third child of the first child of the root)
>>>>
>>>> Thanks!
>>>> Joel
>
Re: how to get Position-dependent navigation [message #105486 is a reply to message #105406] Wed, 18 July 2007 09:36 Go to previous messageGo to next message
Liz Dancy is currently offline Liz Dancy
Messages: 77
Registered: July 2009
Member
Hi Joel,

I am glad you got things working with the Adaptive Widget Resolver. We have
two examples of 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 CVS 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 helps.

Sincerely,

Liz Dancy
"Joel Patterson" <joel_patterson@verizon.net> wrote in message
news:f7jhhm$6mq$1@build.eclipse.org...
> OK, the build was 4.4, thanks.
>
> I've gotten the Adaptive Widget Resolver to work correctly (although it
> does need the reboot as you mentioned) but looks like I need to create a
> custom resolver.
>
> 2.4.1 doesn't address that -- is there an example of how to do that
> somewhere?
>
> Liz Dancy wrote:
>> Hi Joel,
>>
>> You can ensure you have the latest version by checking your Eclipse
>> install under Help > About Eclipse SDK > Feature Details >Click on 'TPTP
>> Automated GUI Recording and Playback' and check the Build ID (shown
>> below). It should begin with TPTP-4.4 if this is the build you
>> downloaded.
>>
>> Don't worry about the versioning numbers on the plugin itself.
>>
>> For more information on the Adaptive Widget Resolver and the AGR in
>> general, including examples, please see:
>> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-4-0.html#2.4.
>>
>> Section 2.4.1 may be of particular interest to you.
>>
>> Sincerely,
>>
>> Liz Dancy
>>
>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>> news:f7jb3n$uk9$1@build.eclipse.org...
>>> The download from eclipse.org seems to be giving me the 4.3 version....
>>>
>>> org\eclipse\tptp\test\auto\gui\internal\resolvers\NonTrivial WidgetResolver
>>> is what I'm seeing in the jar.
>>>
>>> Have I gone to the wrong place?
>>>
>>> Is there some detailed instructions or an example of how to do this? I'm
>>> brand-new to TPTP.
>>>
>>> Liz Dancy wrote:
>>>> Hi Joel,
>>>>
>>>> If you wish to implement your own custom widget resolver you can do so
>>>> and then register it by using the extension point:
>>>> org.eclipse.tptp.test.auto.gui.widgetResolver.
>>>>
>>>> There are two examples in our code base of custom widget resolvers to
>>>> get you started:
>>>>
>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
>>>> and
>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver
>>>>
>>>> Note that you must first declare a dependency on
>>>> org.eclipse.tptp.test.auto.gui.
>>>>
>>>> Please let me know if I can be of further assistance.
>>>>
>>>> Sincerely,
>>>>
>>>> Liz Dancy
>>>>
>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>> news:f7ioaj$mn$1@build.eclipse.org...
>>>>> I'm working with an Eclipse Tree/TreeItem where AGR is using the
>>>>> default entry in widgetReg.xml (which is essentially the text in the
>>>>> item).
>>>>>
>>>>> Example:
>>>>> <command descriptive="ClassCastException (8)" type="item-select"
>>>>> contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
>>>>> widgetId="org.eclipse.swt.widgets.Tree#1">
>>>>> <item path="{{Customer-addOrders(List) (52)-EXCEPTION
>>>>> (18)-ClassCastException (8)}}-{{1.0}}"
>>>>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
>>>>> </command>
>>>>>
>>>>> However, the text is not reliably repeatable, but the position in the
>>>>> tree is. Is there a way to specify position by nodes? (i.e. I want
>>>>> the third child of the first child of the root)
>>>>>
>>>>> Thanks!
>>>>> Joel
>>
Re: how to get Position-dependent navigation [message #105542 is a reply to message #105486] Wed, 18 July 2007 11:02 Go to previous messageGo to next message
Eclipse User
Originally posted by: joel_patterson.verizon.net

Hi Liz,
Making progress! A few more questions:

I got the source code from the location you specified, no problem. In
looking at NonTrivialWidgetResolver source, the documentation states:

* The purpose of this class is to resolve widgets that cannot be
resolved using the
* AdaptiveWidgetResolver. These widgets will likely require nested
calls in order to
* be determined.

But the AdaptiveWidgetResolver has a default section -- so it seems that
NonTrivialWidgetResolver would never be invoked. Is there a way to use
both, or have multiple resolvers? Or is it only one resolver at a time?

I then looked into registering a resolver:
1 ) In TestContainer, select MANIFEST.MF
2 ) Went to the Dependencies Tab
3 ) Selected "Add" and added org.eclipse.tptp.test.auto.gui
4 ) Saved to get it added
5 ) Moved to Extensions Tab
6 ) Unchecked the "Only show extensions from required plugins"
7 ) Added org.eclipse.tptp.test.auto.gui.widgetResolver
8 ) Selected "Browse" for the class and added NonTrivialWidgetResolver

Basically all I needed?

Liz Dancy wrote:
> Hi Joel,
>
> I am glad you got things working with the Adaptive Widget Resolver. We have
> two examples of 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 CVS 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 helps.
>
> Sincerely,
>
> Liz Dancy
> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
> news:f7jhhm$6mq$1@build.eclipse.org...
>> OK, the build was 4.4, thanks.
>>
>> I've gotten the Adaptive Widget Resolver to work correctly (although it
>> does need the reboot as you mentioned) but looks like I need to create a
>> custom resolver.
>>
>> 2.4.1 doesn't address that -- is there an example of how to do that
>> somewhere?
>>
>> Liz Dancy wrote:
>>> Hi Joel,
>>>
>>> You can ensure you have the latest version by checking your Eclipse
>>> install under Help > About Eclipse SDK > Feature Details >Click on 'TPTP
>>> Automated GUI Recording and Playback' and check the Build ID (shown
>>> below). It should begin with TPTP-4.4 if this is the build you
>>> downloaded.
>>>
>>> Don't worry about the versioning numbers on the plugin itself.
>>>
>>> For more information on the Adaptive Widget Resolver and the AGR in
>>> general, including examples, please see:
>>> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-4-0.html#2.4.
>>>
>>> Section 2.4.1 may be of particular interest to you.
>>>
>>> Sincerely,
>>>
>>> Liz Dancy
>>>
>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>> news:f7jb3n$uk9$1@build.eclipse.org...
>>>> The download from eclipse.org seems to be giving me the 4.3 version....
>>>>
>>>> org\eclipse\tptp\test\auto\gui\internal\resolvers\NonTrivial WidgetResolver
>>>> is what I'm seeing in the jar.
>>>>
>>>> Have I gone to the wrong place?
>>>>
>>>> Is there some detailed instructions or an example of how to do this? I'm
>>>> brand-new to TPTP.
>>>>
>>>> Liz Dancy wrote:
>>>>> Hi Joel,
>>>>>
>>>>> If you wish to implement your own custom widget resolver you can do so
>>>>> and then register it by using the extension point:
>>>>> org.eclipse.tptp.test.auto.gui.widgetResolver.
>>>>>
>>>>> There are two examples in our code base of custom widget resolvers to
>>>>> get you started:
>>>>>
>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
>>>>> and
>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver
>>>>>
>>>>> Note that you must first declare a dependency on
>>>>> org.eclipse.tptp.test.auto.gui.
>>>>>
>>>>> Please let me know if I can be of further assistance.
>>>>>
>>>>> Sincerely,
>>>>>
>>>>> Liz Dancy
>>>>>
>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>> news:f7ioaj$mn$1@build.eclipse.org...
>>>>>> I'm working with an Eclipse Tree/TreeItem where AGR is using the
>>>>>> default entry in widgetReg.xml (which is essentially the text in the
>>>>>> item).
>>>>>>
>>>>>> Example:
>>>>>> <command descriptive="ClassCastException (8)" type="item-select"
>>>>>> contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
>>>>>> widgetId="org.eclipse.swt.widgets.Tree#1">
>>>>>> <item path="{{Customer-addOrders(List) (52)-EXCEPTION
>>>>>> (18)-ClassCastException (8)}}-{{1.0}}"
>>>>>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
>>>>>> </command>
>>>>>>
>>>>>> However, the text is not reliably repeatable, but the position in the
>>>>>> tree is. Is there a way to specify position by nodes? (i.e. I want
>>>>>> the third child of the first child of the root)
>>>>>>
>>>>>> Thanks!
>>>>>> Joel
>
>
Re: how to get Position-dependent navigation [message #105584 is a reply to message #105542] Wed, 18 July 2007 14:29 Go to previous messageGo to next message
Eclipse User
Originally posted by: joel_patterson.verizon.net

OK, I do see the NonTrivalWidgetResolver in the generated test script as
resolverId="org.eclipse.tptp.test.auto.gui.nontrivial" -- my mistake.

However, I don't see my own. I copied NonTrivialWidgetResolver to the
TestContainer project, named it
org.eclipse.tptp.test.auto.gui.internal.resolver.MyWidgetRes olver --
removed some of the code and added a resolver for TreeItem specifically.

I renamed ID to
" org.eclipse.tptp.test.auto.gui.internal.resolvers.MyResolver " and set
that to the ID in the extension point. I also set priority to 10000.

But when I create a test, the new resolver is not being used, I see no
references to it -- still org.eclipse.tptp.test.auto.gui.nontrivial.
Any idea as to why or how I could debug this further?

Joel Patterson wrote:
> Hi Liz,
> Making progress! A few more questions:
>
> I got the source code from the location you specified, no problem. In
> looking at NonTrivialWidgetResolver source, the documentation states:
>
> * The purpose of this class is to resolve widgets that cannot be
> resolved using the
> * AdaptiveWidgetResolver. These widgets will likely require nested
> calls in order to
> * be determined.
>
> But the AdaptiveWidgetResolver has a default section -- so it seems that
> NonTrivialWidgetResolver would never be invoked. Is there a way to use
> both, or have multiple resolvers? Or is it only one resolver at a time?
>
> I then looked into registering a resolver:
> 1 ) In TestContainer, select MANIFEST.MF
> 2 ) Went to the Dependencies Tab
> 3 ) Selected "Add" and added org.eclipse.tptp.test.auto.gui
> 4 ) Saved to get it added
> 5 ) Moved to Extensions Tab
> 6 ) Unchecked the "Only show extensions from required plugins"
> 7 ) Added org.eclipse.tptp.test.auto.gui.widgetResolver
> 8 ) Selected "Browse" for the class and added NonTrivialWidgetResolver
>
> Basically all I needed?
>
> Liz Dancy wrote:
>> Hi Joel,
>>
>> I am glad you got things working with the Adaptive Widget Resolver. We
>> have two examples of 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 CVS 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 helps.
>>
>> Sincerely,
>>
>> Liz Dancy
>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>> news:f7jhhm$6mq$1@build.eclipse.org...
>>> OK, the build was 4.4, thanks.
>>>
>>> I've gotten the Adaptive Widget Resolver to work correctly (although
>>> it does need the reboot as you mentioned) but looks like I need to
>>> create a custom resolver.
>>>
>>> 2.4.1 doesn't address that -- is there an example of how to do that
>>> somewhere?
>>>
>>> Liz Dancy wrote:
>>>> Hi Joel,
>>>>
>>>> You can ensure you have the latest version by checking your Eclipse
>>>> install under Help > About Eclipse SDK > Feature Details >Click on
>>>> 'TPTP Automated GUI Recording and Playback' and check the Build ID
>>>> (shown below). It should begin with TPTP-4.4 if this is the build
>>>> you downloaded.
>>>>
>>>> Don't worry about the versioning numbers on the plugin itself.
>>>>
>>>> For more information on the Adaptive Widget Resolver and the AGR in
>>>> general, including examples, please see:
>>>> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-4-0.html#2.4.
>>>>
>>>>
>>>> Section 2.4.1 may be of particular interest to you.
>>>>
>>>> Sincerely,
>>>>
>>>> Liz Dancy
>>>>
>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>> news:f7jb3n$uk9$1@build.eclipse.org...
>>>>> The download from eclipse.org seems to be giving me the 4.3
>>>>> version....
>>>>>
>>>>> org\eclipse\tptp\test\auto\gui\internal\resolvers\NonTrivial WidgetResolver
>>>>> is what I'm seeing in the jar.
>>>>>
>>>>> Have I gone to the wrong place?
>>>>>
>>>>> Is there some detailed instructions or an example of how to do
>>>>> this? I'm brand-new to TPTP.
>>>>>
>>>>> Liz Dancy wrote:
>>>>>> Hi Joel,
>>>>>>
>>>>>> If you wish to implement your own custom widget resolver you can
>>>>>> do so and then register it by using the extension point:
>>>>>> org.eclipse.tptp.test.auto.gui.widgetResolver.
>>>>>>
>>>>>> There are two examples in our code base of custom widget resolvers
>>>>>> to get you started:
>>>>>>
>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
>>>>>> and
>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver
>>>>>>
>>>>>>
>>>>>> Note that you must first declare a dependency on
>>>>>> org.eclipse.tptp.test.auto.gui.
>>>>>>
>>>>>> Please let me know if I can be of further assistance.
>>>>>>
>>>>>> Sincerely,
>>>>>>
>>>>>> Liz Dancy
>>>>>>
>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>> news:f7ioaj$mn$1@build.eclipse.org...
>>>>>>> I'm working with an Eclipse Tree/TreeItem where AGR is using the
>>>>>>> default entry in widgetReg.xml (which is essentially the text in
>>>>>>> the item).
>>>>>>>
>>>>>>> Example:
>>>>>>> <command descriptive="ClassCastException (8)" type="item-select"
>>>>>>> contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
>>>>>>> widgetId="org.eclipse.swt.widgets.Tree#1">
>>>>>>> <item path="{{Customer-addOrders(List) (52)-EXCEPTION
>>>>>>> (18)-ClassCastException (8)}}-{{1.0}}"
>>>>>>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
>>>>>>> </command>
>>>>>>>
>>>>>>> However, the text is not reliably repeatable, but the position in
>>>>>>> the tree is. Is there a way to specify position by nodes?
>>>>>>> (i.e. I want the third child of the first child of the root)
>>>>>>>
>>>>>>> Thanks!
>>>>>>> Joel
>>
>>
Re: how to get Position-dependent navigation [message #105596 is a reply to message #105542] Wed, 18 July 2007 14:27 Go to previous messageGo to next message
Liz Dancy is currently offline Liz Dancy
Messages: 77
Registered: July 2009
Member
Hi Joel,

Glad you are off to a good start. The AGR does support multiple widget
resolvers.

If you look in the MacroManager class you will see that the widget resolvers
are loaded in descending order of their priority (where 1 is loaded before 2
and so on, this is a bit confusing since lower numbers actually indicate
higher priorities). For example, the priority of the non-trivial widget
resolver is set to 11 whereas the priority of the adaptive widget resolver
is set to 10. These are set in the plugin.xml file for the AGR plugin. When
resolving widgets, the AGR steps through the registered widget resolvers and
returns the results of the first resolver that has success in resolving the
widget.

Please see widgetResolver.exsd for instructions on providing an extension.

I hope this provides the information you were looking for.

Sincerely,

Liz Dancy

"Joel Patterson" <joel_patterson@verizon.net> wrote in message
news:f7la1q$pge$1@build.eclipse.org...
> Hi Liz,
> Making progress! A few more questions:
>
> I got the source code from the location you specified, no problem. In
> looking at NonTrivialWidgetResolver source, the documentation states:
>
> * The purpose of this class is to resolve widgets that cannot be resolved
> using the
> * AdaptiveWidgetResolver. These widgets will likely require nested calls
> in order to
> * be determined.
>
> But the AdaptiveWidgetResolver has a default section -- so it seems that
> NonTrivialWidgetResolver would never be invoked. Is there a way to use
> both, or have multiple resolvers? Or is it only one resolver at a time?
>
> I then looked into registering a resolver:
> 1 ) In TestContainer, select MANIFEST.MF
> 2 ) Went to the Dependencies Tab
> 3 ) Selected "Add" and added org.eclipse.tptp.test.auto.gui
> 4 ) Saved to get it added
> 5 ) Moved to Extensions Tab
> 6 ) Unchecked the "Only show extensions from required plugins"
> 7 ) Added org.eclipse.tptp.test.auto.gui.widgetResolver
> 8 ) Selected "Browse" for the class and added NonTrivialWidgetResolver
>
> Basically all I needed?
>
> Liz Dancy wrote:
>> Hi Joel,
>>
>> I am glad you got things working with the Adaptive Widget Resolver. We
>> have two examples of 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 CVS 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 helps.
>>
>> Sincerely,
>>
>> Liz Dancy
>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>> news:f7jhhm$6mq$1@build.eclipse.org...
>>> OK, the build was 4.4, thanks.
>>>
>>> I've gotten the Adaptive Widget Resolver to work correctly (although it
>>> does need the reboot as you mentioned) but looks like I need to create a
>>> custom resolver.
>>>
>>> 2.4.1 doesn't address that -- is there an example of how to do that
>>> somewhere?
>>>
>>> Liz Dancy wrote:
>>>> Hi Joel,
>>>>
>>>> You can ensure you have the latest version by checking your Eclipse
>>>> install under Help > About Eclipse SDK > Feature Details >Click on
>>>> 'TPTP Automated GUI Recording and Playback' and check the Build ID
>>>> (shown below). It should begin with TPTP-4.4 if this is the build you
>>>> downloaded.
>>>>
>>>> Don't worry about the versioning numbers on the plugin itself.
>>>>
>>>> For more information on the Adaptive Widget Resolver and the AGR in
>>>> general, including examples, please see:
>>>> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-4-0.html#2.4.
>>>>
>>>> Section 2.4.1 may be of particular interest to you.
>>>>
>>>> Sincerely,
>>>>
>>>> Liz Dancy
>>>>
>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>> news:f7jb3n$uk9$1@build.eclipse.org...
>>>>> The download from eclipse.org seems to be giving me the 4.3
>>>>> version....
>>>>>
>>>>> org\eclipse\tptp\test\auto\gui\internal\resolvers\NonTrivial WidgetResolver
>>>>> is what I'm seeing in the jar.
>>>>>
>>>>> Have I gone to the wrong place?
>>>>>
>>>>> Is there some detailed instructions or an example of how to do this?
>>>>> I'm brand-new to TPTP.
>>>>>
>>>>> Liz Dancy wrote:
>>>>>> Hi Joel,
>>>>>>
>>>>>> If you wish to implement your own custom widget resolver you can do
>>>>>> so and then register it by using the extension point:
>>>>>> org.eclipse.tptp.test.auto.gui.widgetResolver.
>>>>>>
>>>>>> There are two examples in our code base of custom widget resolvers to
>>>>>> get you started:
>>>>>>
>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
>>>>>> and
>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver
>>>>>>
>>>>>> Note that you must first declare a dependency on
>>>>>> org.eclipse.tptp.test.auto.gui.
>>>>>>
>>>>>> Please let me know if I can be of further assistance.
>>>>>>
>>>>>> Sincerely,
>>>>>>
>>>>>> Liz Dancy
>>>>>>
>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>> news:f7ioaj$mn$1@build.eclipse.org...
>>>>>>> I'm working with an Eclipse Tree/TreeItem where AGR is using the
>>>>>>> default entry in widgetReg.xml (which is essentially the text in the
>>>>>>> item).
>>>>>>>
>>>>>>> Example:
>>>>>>> <command descriptive="ClassCastException (8)" type="item-select"
>>>>>>> contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
>>>>>>> widgetId="org.eclipse.swt.widgets.Tree#1">
>>>>>>> <item path="{{Customer-addOrders(List) (52)-EXCEPTION
>>>>>>> (18)-ClassCastException (8)}}-{{1.0}}"
>>>>>>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
>>>>>>> </command>
>>>>>>>
>>>>>>> However, the text is not reliably repeatable, but the position in
>>>>>>> the tree is. Is there a way to specify position by nodes? (i.e.
>>>>>>> I want the third child of the first child of the root)
>>>>>>>
>>>>>>> Thanks!
>>>>>>> Joel
>>
Re: how to get Position-dependent navigation [message #105610 is a reply to message #105584] Wed, 18 July 2007 14:30 Go to previous messageGo to next message
Liz Dancy is currently offline Liz Dancy
Messages: 77
Registered: July 2009
Member
Hi Joel,

See my previous post about the priority (I think we posted at the same
time). The lower numbers are actually loaded and tried first. I think
setting the priority to 10000 is likely the problem.

Sincerely,

Liz Dancy
"Joel Patterson" <joel_patterson@verizon.net> wrote in message
news:f7lm61$c7b$1@build.eclipse.org...
> OK, I do see the NonTrivalWidgetResolver in the generated test script as
> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial" -- my mistake.
>
> However, I don't see my own. I copied NonTrivialWidgetResolver to the
> TestContainer project, named it
> org.eclipse.tptp.test.auto.gui.internal.resolver.MyWidgetRes olver --
> removed some of the code and added a resolver for TreeItem specifically.
>
> I renamed ID to
> " org.eclipse.tptp.test.auto.gui.internal.resolvers.MyResolver " and set
> that to the ID in the extension point. I also set priority to 10000.
>
> But when I create a test, the new resolver is not being used, I see no
> references to it -- still org.eclipse.tptp.test.auto.gui.nontrivial. Any
> idea as to why or how I could debug this further?
>
> Joel Patterson wrote:
>> Hi Liz,
>> Making progress! A few more questions:
>>
>> I got the source code from the location you specified, no problem. In
>> looking at NonTrivialWidgetResolver source, the documentation states:
>>
>> * The purpose of this class is to resolve widgets that cannot be
>> resolved using the
>> * AdaptiveWidgetResolver. These widgets will likely require nested
>> calls in order to
>> * be determined.
>>
>> But the AdaptiveWidgetResolver has a default section -- so it seems that
>> NonTrivialWidgetResolver would never be invoked. Is there a way to use
>> both, or have multiple resolvers? Or is it only one resolver at a time?
>>
>> I then looked into registering a resolver:
>> 1 ) In TestContainer, select MANIFEST.MF
>> 2 ) Went to the Dependencies Tab
>> 3 ) Selected "Add" and added org.eclipse.tptp.test.auto.gui
>> 4 ) Saved to get it added
>> 5 ) Moved to Extensions Tab
>> 6 ) Unchecked the "Only show extensions from required plugins"
>> 7 ) Added org.eclipse.tptp.test.auto.gui.widgetResolver
>> 8 ) Selected "Browse" for the class and added NonTrivialWidgetResolver
>>
>> Basically all I needed?
>>
>> Liz Dancy wrote:
>>> Hi Joel,
>>>
>>> I am glad you got things working with the Adaptive Widget Resolver. We
>>> have two examples of 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 CVS 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 helps.
>>>
>>> Sincerely,
>>>
>>> Liz Dancy
>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>> news:f7jhhm$6mq$1@build.eclipse.org...
>>>> OK, the build was 4.4, thanks.
>>>>
>>>> I've gotten the Adaptive Widget Resolver to work correctly (although it
>>>> does need the reboot as you mentioned) but looks like I need to create
>>>> a custom resolver.
>>>>
>>>> 2.4.1 doesn't address that -- is there an example of how to do that
>>>> somewhere?
>>>>
>>>> Liz Dancy wrote:
>>>>> Hi Joel,
>>>>>
>>>>> You can ensure you have the latest version by checking your Eclipse
>>>>> install under Help > About Eclipse SDK > Feature Details >Click on
>>>>> 'TPTP Automated GUI Recording and Playback' and check the Build ID
>>>>> (shown below). It should begin with TPTP-4.4 if this is the build you
>>>>> downloaded.
>>>>>
>>>>> Don't worry about the versioning numbers on the plugin itself.
>>>>>
>>>>> For more information on the Adaptive Widget Resolver and the AGR in
>>>>> general, including examples, please see:
>>>>> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-4-0.html#2.4.
>>>>>
>>>>> Section 2.4.1 may be of particular interest to you.
>>>>>
>>>>> Sincerely,
>>>>>
>>>>> Liz Dancy
>>>>>
>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>> news:f7jb3n$uk9$1@build.eclipse.org...
>>>>>> The download from eclipse.org seems to be giving me the 4.3
>>>>>> version....
>>>>>>
>>>>>> org\eclipse\tptp\test\auto\gui\internal\resolvers\NonTrivial WidgetResolver
>>>>>> is what I'm seeing in the jar.
>>>>>>
>>>>>> Have I gone to the wrong place?
>>>>>>
>>>>>> Is there some detailed instructions or an example of how to do this?
>>>>>> I'm brand-new to TPTP.
>>>>>>
>>>>>> Liz Dancy wrote:
>>>>>>> Hi Joel,
>>>>>>>
>>>>>>> If you wish to implement your own custom widget resolver you can do
>>>>>>> so and then register it by using the extension point:
>>>>>>> org.eclipse.tptp.test.auto.gui.widgetResolver.
>>>>>>>
>>>>>>> There are two examples in our code base of custom widget resolvers
>>>>>>> to get you started:
>>>>>>>
>>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
>>>>>>> and
>>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver
>>>>>>>
>>>>>>> Note that you must first declare a dependency on
>>>>>>> org.eclipse.tptp.test.auto.gui.
>>>>>>>
>>>>>>> Please let me know if I can be of further assistance.
>>>>>>>
>>>>>>> Sincerely,
>>>>>>>
>>>>>>> Liz Dancy
>>>>>>>
>>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>>> news:f7ioaj$mn$1@build.eclipse.org...
>>>>>>>> I'm working with an Eclipse Tree/TreeItem where AGR is using the
>>>>>>>> default entry in widgetReg.xml (which is essentially the text in
>>>>>>>> the item).
>>>>>>>>
>>>>>>>> Example:
>>>>>>>> <command descriptive="ClassCastException (8)" type="item-select"
>>>>>>>> contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
>>>>>>>> widgetId="org.eclipse.swt.widgets.Tree#1">
>>>>>>>> <item path="{{Customer-addOrders(List) (52)-EXCEPTION
>>>>>>>> (18)-ClassCastException (8)}}-{{1.0}}"
>>>>>>>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
>>>>>>>> </command>
>>>>>>>>
>>>>>>>> However, the text is not reliably repeatable, but the position in
>>>>>>>> the tree is. Is there a way to specify position by nodes? (i.e.
>>>>>>>> I want the third child of the first child of the root)
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>> Joel
>>>
>>>
Re: how to get Position-dependent navigation [message #105623 is a reply to message #105610] Wed, 18 July 2007 14:52 Go to previous messageGo to next message
Eclipse User
Originally posted by: joel_patterson.verizon.net

Hi Liz,
Doesn't look it. Tried setting to 9 and then to 1, no effect. Tried
restarting Eclipse, but didn't help.
Any way to see that it has loaded the resolver and at least tried to
call it?

Liz Dancy wrote:
> Hi Joel,
>
> See my previous post about the priority (I think we posted at the same
> time). The lower numbers are actually loaded and tried first. I think
> setting the priority to 10000 is likely the problem.
>
> Sincerely,
>
> Liz Dancy
> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
> news:f7lm61$c7b$1@build.eclipse.org...
>> OK, I do see the NonTrivalWidgetResolver in the generated test script as
>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial" -- my mistake.
>>
>> However, I don't see my own. I copied NonTrivialWidgetResolver to the
>> TestContainer project, named it
>> org.eclipse.tptp.test.auto.gui.internal.resolver.MyWidgetRes olver --
>> removed some of the code and added a resolver for TreeItem specifically.
>>
>> I renamed ID to
>> " org.eclipse.tptp.test.auto.gui.internal.resolvers.MyResolver " and set
>> that to the ID in the extension point. I also set priority to 10000.
>>
>> But when I create a test, the new resolver is not being used, I see no
>> references to it -- still org.eclipse.tptp.test.auto.gui.nontrivial. Any
>> idea as to why or how I could debug this further?
>>
>> Joel Patterson wrote:
>>> Hi Liz,
>>> Making progress! A few more questions:
>>>
>>> I got the source code from the location you specified, no problem. In
>>> looking at NonTrivialWidgetResolver source, the documentation states:
>>>
>>> * The purpose of this class is to resolve widgets that cannot be
>>> resolved using the
>>> * AdaptiveWidgetResolver. These widgets will likely require nested
>>> calls in order to
>>> * be determined.
>>>
>>> But the AdaptiveWidgetResolver has a default section -- so it seems that
>>> NonTrivialWidgetResolver would never be invoked. Is there a way to use
>>> both, or have multiple resolvers? Or is it only one resolver at a time?
>>>
>>> I then looked into registering a resolver:
>>> 1 ) In TestContainer, select MANIFEST.MF
>>> 2 ) Went to the Dependencies Tab
>>> 3 ) Selected "Add" and added org.eclipse.tptp.test.auto.gui
>>> 4 ) Saved to get it added
>>> 5 ) Moved to Extensions Tab
>>> 6 ) Unchecked the "Only show extensions from required plugins"
>>> 7 ) Added org.eclipse.tptp.test.auto.gui.widgetResolver
>>> 8 ) Selected "Browse" for the class and added NonTrivialWidgetResolver
>>>
>>> Basically all I needed?
>>>
>>> Liz Dancy wrote:
>>>> Hi Joel,
>>>>
>>>> I am glad you got things working with the Adaptive Widget Resolver. We
>>>> have two examples of 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 CVS 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 helps.
>>>>
>>>> Sincerely,
>>>>
>>>> Liz Dancy
>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>> news:f7jhhm$6mq$1@build.eclipse.org...
>>>>> OK, the build was 4.4, thanks.
>>>>>
>>>>> I've gotten the Adaptive Widget Resolver to work correctly (although it
>>>>> does need the reboot as you mentioned) but looks like I need to create
>>>>> a custom resolver.
>>>>>
>>>>> 2.4.1 doesn't address that -- is there an example of how to do that
>>>>> somewhere?
>>>>>
>>>>> Liz Dancy wrote:
>>>>>> Hi Joel,
>>>>>>
>>>>>> You can ensure you have the latest version by checking your Eclipse
>>>>>> install under Help > About Eclipse SDK > Feature Details >Click on
>>>>>> 'TPTP Automated GUI Recording and Playback' and check the Build ID
>>>>>> (shown below). It should begin with TPTP-4.4 if this is the build you
>>>>>> downloaded.
>>>>>>
>>>>>> Don't worry about the versioning numbers on the plugin itself.
>>>>>>
>>>>>> For more information on the Adaptive Widget Resolver and the AGR in
>>>>>> general, including examples, please see:
>>>>>> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-4-0.html#2.4.
>>>>>>
>>>>>> Section 2.4.1 may be of particular interest to you.
>>>>>>
>>>>>> Sincerely,
>>>>>>
>>>>>> Liz Dancy
>>>>>>
>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>> news:f7jb3n$uk9$1@build.eclipse.org...
>>>>>>> The download from eclipse.org seems to be giving me the 4.3
>>>>>>> version....
>>>>>>>
>>>>>>> org\eclipse\tptp\test\auto\gui\internal\resolvers\NonTrivial WidgetResolver
>>>>>>> is what I'm seeing in the jar.
>>>>>>>
>>>>>>> Have I gone to the wrong place?
>>>>>>>
>>>>>>> Is there some detailed instructions or an example of how to do this?
>>>>>>> I'm brand-new to TPTP.
>>>>>>>
>>>>>>> Liz Dancy wrote:
>>>>>>>> Hi Joel,
>>>>>>>>
>>>>>>>> If you wish to implement your own custom widget resolver you can do
>>>>>>>> so and then register it by using the extension point:
>>>>>>>> org.eclipse.tptp.test.auto.gui.widgetResolver.
>>>>>>>>
>>>>>>>> There are two examples in our code base of custom widget resolvers
>>>>>>>> to get you started:
>>>>>>>>
>>>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
>>>>>>>> and
>>>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver
>>>>>>>>
>>>>>>>> Note that you must first declare a dependency on
>>>>>>>> org.eclipse.tptp.test.auto.gui.
>>>>>>>>
>>>>>>>> Please let me know if I can be of further assistance.
>>>>>>>>
>>>>>>>> Sincerely,
>>>>>>>>
>>>>>>>> Liz Dancy
>>>>>>>>
>>>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>>>> news:f7ioaj$mn$1@build.eclipse.org...
>>>>>>>>> I'm working with an Eclipse Tree/TreeItem where AGR is using the
>>>>>>>>> default entry in widgetReg.xml (which is essentially the text in
>>>>>>>>> the item).
>>>>>>>>>
>>>>>>>>> Example:
>>>>>>>>> <command descriptive="ClassCastException (8)" type="item-select"
>>>>>>>>> contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
>>>>>>>>> widgetId="org.eclipse.swt.widgets.Tree#1">
>>>>>>>>> <item path="{{Customer-addOrders(List) (52)-EXCEPTION
>>>>>>>>> (18)-ClassCastException (8)}}-{{1.0}}"
>>>>>>>>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
>>>>>>>>> </command>
>>>>>>>>>
>>>>>>>>> However, the text is not reliably repeatable, but the position in
>>>>>>>>> the tree is. Is there a way to specify position by nodes? (i.e.
>>>>>>>>> I want the third child of the first child of the root)
>>>>>>>>>
>>>>>>>>> Thanks!
>>>>>>>>> Joel
>>>>
>
>
Re: how to get Position-dependent navigation [message #105781 is a reply to message #105623] Thu, 19 July 2007 09:59 Go to previous messageGo to next message
Liz Dancy is currently offline Liz Dancy
Messages: 77
Registered: July 2009
Member
Hi Joel,

You can set a breakpoint in the code and create a debug launch configuration
of type Eclipse Application from the workbench to debug.

I would set the breakpoint at the point where the resolvers are loaded and
then check that yours is indeed loaded in.

There are a few special instructions for debugging the AGR when you are
debugging the running process:

1. Open the class
org.eclipse.tptp.test.auto.gui.internal.runner.AutoGUIExecOb jAdapter
2. Set DEBUG=true (by default it will be false).
3. Set a break point or break points
4. Launch the test suite in standard mode
5. Create a debug launch configuration of type Remote Java Application
6. Change the port to '8005' and debug

Let me know if you run into any trouble spots. You should be able to debug
the loading of the resolvers during recording and thus avoid the special
setup but its good to know in any case.

Sincerely,

Liz Dancy

"Joel Patterson" <joel_patterson@verizon.net> wrote in message
news:f7lnge$j6v$1@build.eclipse.org...
> Hi Liz,
> Doesn't look it. Tried setting to 9 and then to 1, no effect. Tried
> restarting Eclipse, but didn't help.
> Any way to see that it has loaded the resolver and at least tried to call
> it?
>
> Liz Dancy wrote:
>> Hi Joel,
>>
>> See my previous post about the priority (I think we posted at the same
>> time). The lower numbers are actually loaded and tried first. I think
>> setting the priority to 10000 is likely the problem.
>>
>> Sincerely,
>>
>> Liz Dancy
>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>> news:f7lm61$c7b$1@build.eclipse.org...
>>> OK, I do see the NonTrivalWidgetResolver in the generated test script as
>>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial" -- my mistake.
>>>
>>> However, I don't see my own. I copied NonTrivialWidgetResolver to the
>>> TestContainer project, named it
>>> org.eclipse.tptp.test.auto.gui.internal.resolver.MyWidgetRes olver --
>>> removed some of the code and added a resolver for TreeItem specifically.
>>>
>>> I renamed ID to
>>> " org.eclipse.tptp.test.auto.gui.internal.resolvers.MyResolver " and set
>>> that to the ID in the extension point. I also set priority to 10000.
>>>
>>> But when I create a test, the new resolver is not being used, I see no
>>> references to it -- still org.eclipse.tptp.test.auto.gui.nontrivial. Any
>>> idea as to why or how I could debug this further?
>>>
>>> Joel Patterson wrote:
>>>> Hi Liz,
>>>> Making progress! A few more questions:
>>>>
>>>> I got the source code from the location you specified, no problem. In
>>>> looking at NonTrivialWidgetResolver source, the documentation states:
>>>>
>>>> * The purpose of this class is to resolve widgets that cannot be
>>>> resolved using the
>>>> * AdaptiveWidgetResolver. These widgets will likely require nested
>>>> calls in order to
>>>> * be determined.
>>>>
>>>> But the AdaptiveWidgetResolver has a default section -- so it seems
>>>> that NonTrivialWidgetResolver would never be invoked. Is there a way
>>>> to use both, or have multiple resolvers? Or is it only one resolver
>>>> at a time?
>>>>
>>>> I then looked into registering a resolver:
>>>> 1 ) In TestContainer, select MANIFEST.MF
>>>> 2 ) Went to the Dependencies Tab
>>>> 3 ) Selected "Add" and added org.eclipse.tptp.test.auto.gui
>>>> 4 ) Saved to get it added
>>>> 5 ) Moved to Extensions Tab
>>>> 6 ) Unchecked the "Only show extensions from required plugins"
>>>> 7 ) Added org.eclipse.tptp.test.auto.gui.widgetResolver
>>>> 8 ) Selected "Browse" for the class and added NonTrivialWidgetResolver
>>>>
>>>> Basically all I needed?
>>>>
>>>> Liz Dancy wrote:
>>>>> Hi Joel,
>>>>>
>>>>> I am glad you got things working with the Adaptive Widget Resolver. We
>>>>> have two examples of 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 CVS 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 helps.
>>>>>
>>>>> Sincerely,
>>>>>
>>>>> Liz Dancy
>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>> news:f7jhhm$6mq$1@build.eclipse.org...
>>>>>> OK, the build was 4.4, thanks.
>>>>>>
>>>>>> I've gotten the Adaptive Widget Resolver to work correctly (although
>>>>>> it does need the reboot as you mentioned) but looks like I need to
>>>>>> create a custom resolver.
>>>>>>
>>>>>> 2.4.1 doesn't address that -- is there an example of how to do that
>>>>>> somewhere?
>>>>>>
>>>>>> Liz Dancy wrote:
>>>>>>> Hi Joel,
>>>>>>>
>>>>>>> You can ensure you have the latest version by checking your Eclipse
>>>>>>> install under Help > About Eclipse SDK > Feature Details >Click on
>>>>>>> 'TPTP Automated GUI Recording and Playback' and check the Build ID
>>>>>>> (shown below). It should begin with TPTP-4.4 if this is the build
>>>>>>> you downloaded.
>>>>>>>
>>>>>>> Don't worry about the versioning numbers on the plugin itself.
>>>>>>>
>>>>>>> For more information on the Adaptive Widget Resolver and the AGR in
>>>>>>> general, including examples, please see:
>>>>>>> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-4-0.html#2.4.
>>>>>>>
>>>>>>> Section 2.4.1 may be of particular interest to you.
>>>>>>>
>>>>>>> Sincerely,
>>>>>>>
>>>>>>> Liz Dancy
>>>>>>>
>>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>>> news:f7jb3n$uk9$1@build.eclipse.org...
>>>>>>>> The download from eclipse.org seems to be giving me the 4.3
>>>>>>>> version....
>>>>>>>>
>>>>>>>> org\eclipse\tptp\test\auto\gui\internal\resolvers\NonTrivial WidgetResolver
>>>>>>>> is what I'm seeing in the jar.
>>>>>>>>
>>>>>>>> Have I gone to the wrong place?
>>>>>>>>
>>>>>>>> Is there some detailed instructions or an example of how to do
>>>>>>>> this? I'm brand-new to TPTP.
>>>>>>>>
>>>>>>>> Liz Dancy wrote:
>>>>>>>>> Hi Joel,
>>>>>>>>>
>>>>>>>>> If you wish to implement your own custom widget resolver you can
>>>>>>>>> do so and then register it by using the extension point:
>>>>>>>>> org.eclipse.tptp.test.auto.gui.widgetResolver.
>>>>>>>>>
>>>>>>>>> There are two examples in our code base of custom widget resolvers
>>>>>>>>> to get you started:
>>>>>>>>>
>>>>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
>>>>>>>>> and
>>>>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver
>>>>>>>>>
>>>>>>>>> Note that you must first declare a dependency on
>>>>>>>>> org.eclipse.tptp.test.auto.gui.
>>>>>>>>>
>>>>>>>>> Please let me know if I can be of further assistance.
>>>>>>>>>
>>>>>>>>> Sincerely,
>>>>>>>>>
>>>>>>>>> Liz Dancy
>>>>>>>>>
>>>>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>>>>> news:f7ioaj$mn$1@build.eclipse.org...
>>>>>>>>>> I'm working with an Eclipse Tree/TreeItem where AGR is using the
>>>>>>>>>> default entry in widgetReg.xml (which is essentially the text in
>>>>>>>>>> the item).
>>>>>>>>>>
>>>>>>>>>> Example:
>>>>>>>>>> <command descriptive="ClassCastException (8)" type="item-select"
>>>>>>>>>> contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
>>>>>>>>>> widgetId="org.eclipse.swt.widgets.Tree#1">
>>>>>>>>>> <item path="{{Customer-addOrders(List) (52)-EXCEPTION
>>>>>>>>>> (18)-ClassCastException (8)}}-{{1.0}}"
>>>>>>>>>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
>>>>>>>>>> </command>
>>>>>>>>>>
>>>>>>>>>> However, the text is not reliably repeatable, but the position in
>>>>>>>>>> the tree is. Is there a way to specify position by nodes?
>>>>>>>>>> (i.e. I want the third child of the first child of the root)
>>>>>>>>>>
>>>>>>>>>> Thanks!
>>>>>>>>>> Joel
>>>>>
>>
Re: how to get Position-dependent navigation [message #105827 is a reply to message #105781] Thu, 19 July 2007 11:19 Go to previous messageGo to next message
Eclipse User
Originally posted by: joel_patterson.verizon.net

Hi Liz,
I'm going to ask what in retrospec appears to be amazingly obvious.
Do I need to create the new resolver in the AGR download, or can I
create it in the TestResolver project and reference it from there (which
is what I was doing).

Liz Dancy wrote:
> Hi Joel,
>
> You can set a breakpoint in the code and create a debug launch configuration
> of type Eclipse Application from the workbench to debug.
>
> I would set the breakpoint at the point where the resolvers are loaded and
> then check that yours is indeed loaded in.
>
> There are a few special instructions for debugging the AGR when you are
> debugging the running process:
>
> 1. Open the class
> org.eclipse.tptp.test.auto.gui.internal.runner.AutoGUIExecOb jAdapter
> 2. Set DEBUG=true (by default it will be false).
> 3. Set a break point or break points
> 4. Launch the test suite in standard mode
> 5. Create a debug launch configuration of type Remote Java Application
> 6. Change the port to '8005' and debug
>
> Let me know if you run into any trouble spots. You should be able to debug
> the loading of the resolvers during recording and thus avoid the special
> setup but its good to know in any case.
>
> Sincerely,
>
> Liz Dancy
>
> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
> news:f7lnge$j6v$1@build.eclipse.org...
>> Hi Liz,
>> Doesn't look it. Tried setting to 9 and then to 1, no effect. Tried
>> restarting Eclipse, but didn't help.
>> Any way to see that it has loaded the resolver and at least tried to call
>> it?
>>
>> Liz Dancy wrote:
>>> Hi Joel,
>>>
>>> See my previous post about the priority (I think we posted at the same
>>> time). The lower numbers are actually loaded and tried first. I think
>>> setting the priority to 10000 is likely the problem.
>>>
>>> Sincerely,
>>>
>>> Liz Dancy
>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>> news:f7lm61$c7b$1@build.eclipse.org...
>>>> OK, I do see the NonTrivalWidgetResolver in the generated test script as
>>>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial" -- my mistake.
>>>>
>>>> However, I don't see my own. I copied NonTrivialWidgetResolver to the
>>>> TestContainer project, named it
>>>> org.eclipse.tptp.test.auto.gui.internal.resolver.MyWidgetRes olver --
>>>> removed some of the code and added a resolver for TreeItem specifically.
>>>>
>>>> I renamed ID to
>>>> " org.eclipse.tptp.test.auto.gui.internal.resolvers.MyResolver " and set
>>>> that to the ID in the extension point. I also set priority to 10000.
>>>>
>>>> But when I create a test, the new resolver is not being used, I see no
>>>> references to it -- still org.eclipse.tptp.test.auto.gui.nontrivial. Any
>>>> idea as to why or how I could debug this further?
>>>>
>>>> Joel Patterson wrote:
>>>>> Hi Liz,
>>>>> Making progress! A few more questions:
>>>>>
>>>>> I got the source code from the location you specified, no problem. In
>>>>> looking at NonTrivialWidgetResolver source, the documentation states:
>>>>>
>>>>> * The purpose of this class is to resolve widgets that cannot be
>>>>> resolved using the
>>>>> * AdaptiveWidgetResolver. These widgets will likely require nested
>>>>> calls in order to
>>>>> * be determined.
>>>>>
>>>>> But the AdaptiveWidgetResolver has a default section -- so it seems
>>>>> that NonTrivialWidgetResolver would never be invoked. Is there a way
>>>>> to use both, or have multiple resolvers? Or is it only one resolver
>>>>> at a time?
>>>>>
>>>>> I then looked into registering a resolver:
>>>>> 1 ) In TestContainer, select MANIFEST.MF
>>>>> 2 ) Went to the Dependencies Tab
>>>>> 3 ) Selected "Add" and added org.eclipse.tptp.test.auto.gui
>>>>> 4 ) Saved to get it added
>>>>> 5 ) Moved to Extensions Tab
>>>>> 6 ) Unchecked the "Only show extensions from required plugins"
>>>>> 7 ) Added org.eclipse.tptp.test.auto.gui.widgetResolver
>>>>> 8 ) Selected "Browse" for the class and added NonTrivialWidgetResolver
>>>>>
>>>>> Basically all I needed?
>>>>>
>>>>> Liz Dancy wrote:
>>>>>> Hi Joel,
>>>>>>
>>>>>> I am glad you got things working with the Adaptive Widget Resolver. We
>>>>>> have two examples of 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 CVS 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 helps.
>>>>>>
>>>>>> Sincerely,
>>>>>>
>>>>>> Liz Dancy
>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>> news:f7jhhm$6mq$1@build.eclipse.org...
>>>>>>> OK, the build was 4.4, thanks.
>>>>>>>
>>>>>>> I've gotten the Adaptive Widget Resolver to work correctly (although
>>>>>>> it does need the reboot as you mentioned) but looks like I need to
>>>>>>> create a custom resolver.
>>>>>>>
>>>>>>> 2.4.1 doesn't address that -- is there an example of how to do that
>>>>>>> somewhere?
>>>>>>>
>>>>>>> Liz Dancy wrote:
>>>>>>>> Hi Joel,
>>>>>>>>
>>>>>>>> You can ensure you have the latest version by checking your Eclipse
>>>>>>>> install under Help > About Eclipse SDK > Feature Details >Click on
>>>>>>>> 'TPTP Automated GUI Recording and Playback' and check the Build ID
>>>>>>>> (shown below). It should begin with TPTP-4.4 if this is the build
>>>>>>>> you downloaded.
>>>>>>>>
>>>>>>>> Don't worry about the versioning numbers on the plugin itself.
>>>>>>>>
>>>>>>>> For more information on the Adaptive Widget Resolver and the AGR in
>>>>>>>> general, including examples, please see:
>>>>>>>> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-4-0.html#2.4.
>>>>>>>>
>>>>>>>> Section 2.4.1 may be of particular interest to you.
>>>>>>>>
>>>>>>>> Sincerely,
>>>>>>>>
>>>>>>>> Liz Dancy
>>>>>>>>
>>>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>>>> news:f7jb3n$uk9$1@build.eclipse.org...
>>>>>>>>> The download from eclipse.org seems to be giving me the 4.3
>>>>>>>>> version....
>>>>>>>>>
>>>>>>>>> org\eclipse\tptp\test\auto\gui\internal\resolvers\NonTrivial WidgetResolver
>>>>>>>>> is what I'm seeing in the jar.
>>>>>>>>>
>>>>>>>>> Have I gone to the wrong place?
>>>>>>>>>
>>>>>>>>> Is there some detailed instructions or an example of how to do
>>>>>>>>> this? I'm brand-new to TPTP.
>>>>>>>>>
>>>>>>>>> Liz Dancy wrote:
>>>>>>>>>> Hi Joel,
>>>>>>>>>>
>>>>>>>>>> If you wish to implement your own custom widget resolver you can
>>>>>>>>>> do so and then register it by using the extension point:
>>>>>>>>>> org.eclipse.tptp.test.auto.gui.widgetResolver.
>>>>>>>>>>
>>>>>>>>>> There are two examples in our code base of custom widget resolvers
>>>>>>>>>> to get you started:
>>>>>>>>>>
>>>>>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
>>>>>>>>>> and
>>>>>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver
>>>>>>>>>>
>>>>>>>>>> Note that you must first declare a dependency on
>>>>>>>>>> org.eclipse.tptp.test.auto.gui.
>>>>>>>>>>
>>>>>>>>>> Please let me know if I can be of further assistance.
>>>>>>>>>>
>>>>>>>>>> Sincerely,
>>>>>>>>>>
>>>>>>>>>> Liz Dancy
>>>>>>>>>>
>>>>>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>>>>>> news:f7ioaj$mn$1@build.eclipse.org...
>>>>>>>>>>> I'm working with an Eclipse Tree/TreeItem where AGR is using the
>>>>>>>>>>> default entry in widgetReg.xml (which is essentially the text in
>>>>>>>>>>> the item).
>>>>>>>>>>>
>>>>>>>>>>> Example:
>>>>>>>>>>> <command descriptive="ClassCastException (8)" type="item-select"
>>>>>>>>>>> contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
>>>>>>>>>>> widgetId="org.eclipse.swt.widgets.Tree#1">
>>>>>>>>>>> <item path="{{Customer-addOrders(List) (52)-EXCEPTION
>>>>>>>>>>> (18)-ClassCastException (8)}}-{{1.0}}"
>>>>>>>>>>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
>>>>>>>>>>> </command>
>>>>>>>>>>>
>>>>>>>>>>> However, the text is not reliably repeatable, but the position in
>>>>>>>>>>> the tree is. Is there a way to specify position by nodes?
>>>>>>>>>>> (i.e. I want the third child of the first child of the root)
>>>>>>>>>>>
>>>>>>>>>>> Thanks!
>>>>>>>>>>> Joel
>
Re: how to get Position-dependent navigation [message #105854 is a reply to message #105827] Thu, 19 July 2007 13:44 Go to previous messageGo to next message
Liz Dancy is currently offline Liz Dancy
Messages: 77
Registered: July 2009
Member
Hi Joel,

I am a bit confused at what you are asking, specifically the terms AGR
download and TestResolver project. Feel free to send me your project or
workspace and I can help you ensure the resolver is registered properly.

Sincerely,

Liz Dancy

"Joel Patterson" <joel_patterson@verizon.net> wrote in message
news:f7nvdu$5kr$1@build.eclipse.org...
> Hi Liz,
> I'm going to ask what in retrospec appears to be amazingly obvious.
> Do I need to create the new resolver in the AGR download, or can I create
> it in the TestResolver project and reference it from there (which is what
> I was doing).
>
> Liz Dancy wrote:
>> Hi Joel,
>>
>> You can set a breakpoint in the code and create a debug launch
>> configuration of type Eclipse Application from the workbench to debug.
>>
>> I would set the breakpoint at the point where the resolvers are loaded
>> and then check that yours is indeed loaded in.
>>
>> There are a few special instructions for debugging the AGR when you are
>> debugging the running process:
>>
>> 1. Open the class
>> org.eclipse.tptp.test.auto.gui.internal.runner.AutoGUIExecOb jAdapter
>> 2. Set DEBUG=true (by default it will be false).
>> 3. Set a break point or break points
>> 4. Launch the test suite in standard mode
>> 5. Create a debug launch configuration of type Remote Java Application
>> 6. Change the port to '8005' and debug
>>
>> Let me know if you run into any trouble spots. You should be able to
>> debug the loading of the resolvers during recording and thus avoid the
>> special setup but its good to know in any case.
>>
>> Sincerely,
>>
>> Liz Dancy
>>
>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>> news:f7lnge$j6v$1@build.eclipse.org...
>>> Hi Liz,
>>> Doesn't look it. Tried setting to 9 and then to 1, no effect. Tried
>>> restarting Eclipse, but didn't help.
>>> Any way to see that it has loaded the resolver and at least tried to
>>> call it?
>>>
>>> Liz Dancy wrote:
>>>> Hi Joel,
>>>>
>>>> See my previous post about the priority (I think we posted at the same
>>>> time). The lower numbers are actually loaded and tried first. I think
>>>> setting the priority to 10000 is likely the problem.
>>>>
>>>> Sincerely,
>>>>
>>>> Liz Dancy
>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>> news:f7lm61$c7b$1@build.eclipse.org...
>>>>> OK, I do see the NonTrivalWidgetResolver in the generated test script
>>>>> as resolverId="org.eclipse.tptp.test.auto.gui.nontrivial" -- my
>>>>> mistake.
>>>>>
>>>>> However, I don't see my own. I copied NonTrivialWidgetResolver to
>>>>> the TestContainer project, named it
>>>>> org.eclipse.tptp.test.auto.gui.internal.resolver.MyWidgetRes olver --
>>>>> removed some of the code and added a resolver for TreeItem
>>>>> specifically.
>>>>>
>>>>> I renamed ID to
>>>>> " org.eclipse.tptp.test.auto.gui.internal.resolvers.MyResolver " and set
>>>>> that to the ID in the extension point. I also set priority to 10000.
>>>>>
>>>>> But when I create a test, the new resolver is not being used, I see no
>>>>> references to it -- still org.eclipse.tptp.test.auto.gui.nontrivial.
>>>>> Any idea as to why or how I could debug this further?
>>>>>
>>>>> Joel Patterson wrote:
>>>>>> Hi Liz,
>>>>>> Making progress! A few more questions:
>>>>>>
>>>>>> I got the source code from the location you specified, no problem.
>>>>>> In looking at NonTrivialWidgetResolver source, the documentation
>>>>>> states:
>>>>>>
>>>>>> * The purpose of this class is to resolve widgets that cannot be
>>>>>> resolved using the
>>>>>> * AdaptiveWidgetResolver. These widgets will likely require nested
>>>>>> calls in order to
>>>>>> * be determined.
>>>>>>
>>>>>> But the AdaptiveWidgetResolver has a default section -- so it seems
>>>>>> that NonTrivialWidgetResolver would never be invoked. Is there a
>>>>>> way to use both, or have multiple resolvers? Or is it only one
>>>>>> resolver at a time?
>>>>>>
>>>>>> I then looked into registering a resolver:
>>>>>> 1 ) In TestContainer, select MANIFEST.MF
>>>>>> 2 ) Went to the Dependencies Tab
>>>>>> 3 ) Selected "Add" and added org.eclipse.tptp.test.auto.gui
>>>>>> 4 ) Saved to get it added
>>>>>> 5 ) Moved to Extensions Tab
>>>>>> 6 ) Unchecked the "Only show extensions from required plugins"
>>>>>> 7 ) Added org.eclipse.tptp.test.auto.gui.widgetResolver
>>>>>> 8 ) Selected "Browse" for the class and added
>>>>>> NonTrivialWidgetResolver
>>>>>>
>>>>>> Basically all I needed?
>>>>>>
>>>>>> Liz Dancy wrote:
>>>>>>> Hi Joel,
>>>>>>>
>>>>>>> I am glad you got things working with the Adaptive Widget Resolver.
>>>>>>> We have two examples of 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 CVS 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 helps.
>>>>>>>
>>>>>>> Sincerely,
>>>>>>>
>>>>>>> Liz Dancy
>>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>>> news:f7jhhm$6mq$1@build.eclipse.org...
>>>>>>>> OK, the build was 4.4, thanks.
>>>>>>>>
>>>>>>>> I've gotten the Adaptive Widget Resolver to work correctly
>>>>>>>> (although it does need the reboot as you mentioned) but looks like
>>>>>>>> I need to create a custom resolver.
>>>>>>>>
>>>>>>>> 2.4.1 doesn't address that -- is there an example of how to do that
>>>>>>>> somewhere?
>>>>>>>>
>>>>>>>> Liz Dancy wrote:
>>>>>>>>> Hi Joel,
>>>>>>>>>
>>>>>>>>> You can ensure you have the latest version by checking your
>>>>>>>>> Eclipse install under Help > About Eclipse SDK > Feature Details
>>>>>>>>> >Click on 'TPTP Automated GUI Recording and Playback' and check
>>>>>>>>> the Build ID (shown below). It should begin with TPTP-4.4 if this
>>>>>>>>> is the build you downloaded.
>>>>>>>>>
>>>>>>>>> Don't worry about the versioning numbers on the plugin itself.
>>>>>>>>>
>>>>>>>>> For more information on the Adaptive Widget Resolver and the AGR
>>>>>>>>> in general, including examples, please see:
>>>>>>>>> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-4-0.html#2.4.
>>>>>>>>>
>>>>>>>>> Section 2.4.1 may be of particular interest to you.
>>>>>>>>>
>>>>>>>>> Sincerely,
>>>>>>>>>
>>>>>>>>> Liz Dancy
>>>>>>>>>
>>>>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>>>>> news:f7jb3n$uk9$1@build.eclipse.org...
>>>>>>>>>> The download from eclipse.org seems to be giving me the 4.3
>>>>>>>>>> version....
>>>>>>>>>>
>>>>>>>>>> org\eclipse\tptp\test\auto\gui\internal\resolvers\NonTrivial WidgetResolver
>>>>>>>>>> is what I'm seeing in the jar.
>>>>>>>>>>
>>>>>>>>>> Have I gone to the wrong place?
>>>>>>>>>>
>>>>>>>>>> Is there some detailed instructions or an example of how to do
>>>>>>>>>> this? I'm brand-new to TPTP.
>>>>>>>>>>
>>>>>>>>>> Liz Dancy wrote:
>>>>>>>>>>> Hi Joel,
>>>>>>>>>>>
>>>>>>>>>>> If you wish to implement your own custom widget resolver you can
>>>>>>>>>>> do so and then register it by using the extension point:
>>>>>>>>>>> org.eclipse.tptp.test.auto.gui.widgetResolver.
>>>>>>>>>>>
>>>>>>>>>>> There are two examples in our code base of custom widget
>>>>>>>>>>> resolvers to get you started:
>>>>>>>>>>>
>>>>>>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
>>>>>>>>>>> and
>>>>>>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver
>>>>>>>>>>>
>>>>>>>>>>> Note that you must first declare a dependency on
>>>>>>>>>>> org.eclipse.tptp.test.auto.gui.
>>>>>>>>>>>
>>>>>>>>>>> Please let me know if I can be of further assistance.
>>>>>>>>>>>
>>>>>>>>>>> Sincerely,
>>>>>>>>>>>
>>>>>>>>>>> Liz Dancy
>>>>>>>>>>>
>>>>>>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>>>>>>> news:f7ioaj$mn$1@build.eclipse.org...
>>>>>>>>>>>> I'm working with an Eclipse Tree/TreeItem where AGR is using
>>>>>>>>>>>> the default entry in widgetReg.xml (which is essentially the
>>>>>>>>>>>> text in the item).
>>>>>>>>>>>>
>>>>>>>>>>>> Example:
>>>>>>>>>>>> <command descriptive="ClassCastException (8)"
>>>>>>>>>>>> type="item-select"
>>>>>>>>>>>> contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
>>>>>>>>>>>> widgetId="org.eclipse.swt.widgets.Tree#1">
>>>>>>>>>>>> <item path="{{Customer-addOrders(List) (52)-EXCEPTION
>>>>>>>>>>>> (18)-ClassCastException (8)}}-{{1.0}}"
>>>>>>>>>>>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
>>>>>>>>>>>> </command>
>>>>>>>>>>>>
>>>>>>>>>>>> However, the text is not reliably repeatable, but the position
>>>>>>>>>>>> in the tree is. Is there a way to specify position by nodes?
>>>>>>>>>>>> (i.e. I want the third child of the first child of the root)
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks!
>>>>>>>>>>>> Joel
>>
Re: how to get Position-dependent navigation [message #105869 is a reply to message #105854] Thu, 19 July 2007 17:07 Go to previous message
Liz Dancy is currently offline Liz Dancy
Messages: 77
Registered: July 2009
Member
Hi Joel,

Thanks for sending me your workspace. I have successfully hit your widget
resolver. I had to export the package containing your widgetResolver class
using the runtime Tab in the plugin.xml view.

Sincerely,

Liz Dancy
"Liz Dancy" <lizdancy@ca.ibm.com> wrote in message
news:f7o81h$i88$1@build.eclipse.org...
> Hi Joel,
>
> I am a bit confused at what you are asking, specifically the terms AGR
> download and TestResolver project. Feel free to send me your project or
> workspace and I can help you ensure the resolver is registered properly.
>
> Sincerely,
>
> Liz Dancy
>
> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
> news:f7nvdu$5kr$1@build.eclipse.org...
>> Hi Liz,
>> I'm going to ask what in retrospec appears to be amazingly obvious.
>> Do I need to create the new resolver in the AGR download, or can I create
>> it in the TestResolver project and reference it from there (which is what
>> I was doing).
>>
>> Liz Dancy wrote:
>>> Hi Joel,
>>>
>>> You can set a breakpoint in the code and create a debug launch
>>> configuration of type Eclipse Application from the workbench to debug.
>>>
>>> I would set the breakpoint at the point where the resolvers are loaded
>>> and then check that yours is indeed loaded in.
>>>
>>> There are a few special instructions for debugging the AGR when you are
>>> debugging the running process:
>>>
>>> 1. Open the class
>>> org.eclipse.tptp.test.auto.gui.internal.runner.AutoGUIExecOb jAdapter
>>> 2. Set DEBUG=true (by default it will be false).
>>> 3. Set a break point or break points
>>> 4. Launch the test suite in standard mode
>>> 5. Create a debug launch configuration of type Remote Java Application
>>> 6. Change the port to '8005' and debug
>>>
>>> Let me know if you run into any trouble spots. You should be able to
>>> debug the loading of the resolvers during recording and thus avoid the
>>> special setup but its good to know in any case.
>>>
>>> Sincerely,
>>>
>>> Liz Dancy
>>>
>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>> news:f7lnge$j6v$1@build.eclipse.org...
>>>> Hi Liz,
>>>> Doesn't look it. Tried setting to 9 and then to 1, no effect. Tried
>>>> restarting Eclipse, but didn't help.
>>>> Any way to see that it has loaded the resolver and at least tried to
>>>> call it?
>>>>
>>>> Liz Dancy wrote:
>>>>> Hi Joel,
>>>>>
>>>>> See my previous post about the priority (I think we posted at the same
>>>>> time). The lower numbers are actually loaded and tried first. I think
>>>>> setting the priority to 10000 is likely the problem.
>>>>>
>>>>> Sincerely,
>>>>>
>>>>> Liz Dancy
>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>> news:f7lm61$c7b$1@build.eclipse.org...
>>>>>> OK, I do see the NonTrivalWidgetResolver in the generated test script
>>>>>> as resolverId="org.eclipse.tptp.test.auto.gui.nontrivial" -- my
>>>>>> mistake.
>>>>>>
>>>>>> However, I don't see my own. I copied NonTrivialWidgetResolver to
>>>>>> the TestContainer project, named it
>>>>>> org.eclipse.tptp.test.auto.gui.internal.resolver.MyWidgetRes olver --
>>>>>> removed some of the code and added a resolver for TreeItem
>>>>>> specifically.
>>>>>>
>>>>>> I renamed ID to
>>>>>> " org.eclipse.tptp.test.auto.gui.internal.resolvers.MyResolver " and
>>>>>> set that to the ID in the extension point. I also set priority to
>>>>>> 10000.
>>>>>>
>>>>>> But when I create a test, the new resolver is not being used, I see
>>>>>> no references to it -- still
>>>>>> org.eclipse.tptp.test.auto.gui.nontrivial. Any idea as to why or how
>>>>>> I could debug this further?
>>>>>>
>>>>>> Joel Patterson wrote:
>>>>>>> Hi Liz,
>>>>>>> Making progress! A few more questions:
>>>>>>>
>>>>>>> I got the source code from the location you specified, no problem.
>>>>>>> In looking at NonTrivialWidgetResolver source, the documentation
>>>>>>> states:
>>>>>>>
>>>>>>> * The purpose of this class is to resolve widgets that cannot be
>>>>>>> resolved using the
>>>>>>> * AdaptiveWidgetResolver. These widgets will likely require nested
>>>>>>> calls in order to
>>>>>>> * be determined.
>>>>>>>
>>>>>>> But the AdaptiveWidgetResolver has a default section -- so it seems
>>>>>>> that NonTrivialWidgetResolver would never be invoked. Is there a
>>>>>>> way to use both, or have multiple resolvers? Or is it only one
>>>>>>> resolver at a time?
>>>>>>>
>>>>>>> I then looked into registering a resolver:
>>>>>>> 1 ) In TestContainer, select MANIFEST.MF
>>>>>>> 2 ) Went to the Dependencies Tab
>>>>>>> 3 ) Selected "Add" and added org.eclipse.tptp.test.auto.gui
>>>>>>> 4 ) Saved to get it added
>>>>>>> 5 ) Moved to Extensions Tab
>>>>>>> 6 ) Unchecked the "Only show extensions from required plugins"
>>>>>>> 7 ) Added org.eclipse.tptp.test.auto.gui.widgetResolver
>>>>>>> 8 ) Selected "Browse" for the class and added
>>>>>>> NonTrivialWidgetResolver
>>>>>>>
>>>>>>> Basically all I needed?
>>>>>>>
>>>>>>> Liz Dancy wrote:
>>>>>>>> Hi Joel,
>>>>>>>>
>>>>>>>> I am glad you got things working with the Adaptive Widget Resolver.
>>>>>>>> We have two examples of 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 CVS 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 helps.
>>>>>>>>
>>>>>>>> Sincerely,
>>>>>>>>
>>>>>>>> Liz Dancy
>>>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>>>> news:f7jhhm$6mq$1@build.eclipse.org...
>>>>>>>>> OK, the build was 4.4, thanks.
>>>>>>>>>
>>>>>>>>> I've gotten the Adaptive Widget Resolver to work correctly
>>>>>>>>> (although it does need the reboot as you mentioned) but looks like
>>>>>>>>> I need to create a custom resolver.
>>>>>>>>>
>>>>>>>>> 2.4.1 doesn't address that -- is there an example of how to do
>>>>>>>>> that somewhere?
>>>>>>>>>
>>>>>>>>> Liz Dancy wrote:
>>>>>>>>>> Hi Joel,
>>>>>>>>>>
>>>>>>>>>> You can ensure you have the latest version by checking your
>>>>>>>>>> Eclipse install under Help > About Eclipse SDK > Feature Details
>>>>>>>>>> >Click on 'TPTP Automated GUI Recording and Playback' and check
>>>>>>>>>> the Build ID (shown below). It should begin with TPTP-4.4 if this
>>>>>>>>>> is the build you downloaded.
>>>>>>>>>>
>>>>>>>>>> Don't worry about the versioning numbers on the plugin itself.
>>>>>>>>>>
>>>>>>>>>> For more information on the Adaptive Widget Resolver and the AGR
>>>>>>>>>> in general, including examples, please see:
>>>>>>>>>> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-4-0.html#2.4.
>>>>>>>>>>
>>>>>>>>>> Section 2.4.1 may be of particular interest to you.
>>>>>>>>>>
>>>>>>>>>> Sincerely,
>>>>>>>>>>
>>>>>>>>>> Liz Dancy
>>>>>>>>>>
>>>>>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>>>>>> news:f7jb3n$uk9$1@build.eclipse.org...
>>>>>>>>>>> The download from eclipse.org seems to be giving me the 4.3
>>>>>>>>>>> version....
>>>>>>>>>>>
>>>>>>>>>>> org\eclipse\tptp\test\auto\gui\internal\resolvers\NonTrivial WidgetResolver
>>>>>>>>>>> is what I'm seeing in the jar.
>>>>>>>>>>>
>>>>>>>>>>> Have I gone to the wrong place?
>>>>>>>>>>>
>>>>>>>>>>> Is there some detailed instructions or an example of how to do
>>>>>>>>>>> this? I'm brand-new to TPTP.
>>>>>>>>>>>
>>>>>>>>>>> Liz Dancy wrote:
>>>>>>>>>>>> Hi Joel,
>>>>>>>>>>>>
>>>>>>>>>>>> If you wish to implement your own custom widget resolver you
>>>>>>>>>>>> can do so and then register it by using the extension point:
>>>>>>>>>>>> org.eclipse.tptp.test.auto.gui.widgetResolver.
>>>>>>>>>>>>
>>>>>>>>>>>> There are two examples in our code base of custom widget
>>>>>>>>>>>> resolvers to get you started:
>>>>>>>>>>>>
>>>>>>>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.NonTrivialW idgetResolver
>>>>>>>>>>>> and
>>>>>>>>>>>> org.eclipse.tptp.test.auto.gui.internal.recorder.AdaptiveWid getResolver
>>>>>>>>>>>>
>>>>>>>>>>>> Note that you must first declare a dependency on
>>>>>>>>>>>> org.eclipse.tptp.test.auto.gui.
>>>>>>>>>>>>
>>>>>>>>>>>> Please let me know if I can be of further assistance.
>>>>>>>>>>>>
>>>>>>>>>>>> Sincerely,
>>>>>>>>>>>>
>>>>>>>>>>>> Liz Dancy
>>>>>>>>>>>>
>>>>>>>>>>>> "Joel Patterson" <joel_patterson@verizon.net> wrote in message
>>>>>>>>>>>> news:f7ioaj$mn$1@build.eclipse.org...
>>>>>>>>>>>>> I'm working with an Eclipse Tree/TreeItem where AGR is using
>>>>>>>>>>>>> the default entry in widgetReg.xml (which is essentially the
>>>>>>>>>>>>> text in the item).
>>>>>>>>>>>>>
>>>>>>>>>>>>> Example:
>>>>>>>>>>>>> <command descriptive="ClassCastException (8)"
>>>>>>>>>>>>> type="item-select"
>>>>>>>>>>>>> contextId="view/com.agitar.eclipse.outcomes.views.OutcomesView "
>>>>>>>>>>>>> widgetId="org.eclipse.swt.widgets.Tree#1">
>>>>>>>>>>>>> <item path="{{Customer-addOrders(List) (52)-EXCEPTION
>>>>>>>>>>>>> (18)-ClassCastException (8)}}-{{1.0}}"
>>>>>>>>>>>>> resolverId="org.eclipse.tptp.test.auto.gui.nontrivial"/>
>>>>>>>>>>>>> </command>
>>>>>>>>>>>>>
>>>>>>>>>>>>> However, the text is not reliably repeatable, but the position
>>>>>>>>>>>>> in the tree is. Is there a way to specify position by nodes?
>>>>>>>>>>>>> (i.e. I want the third child of the first child of the root)
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks!
>>>>>>>>>>>>> Joel
>>>
>
>
Previous Topic:Agent Controller for localhost doesn't work if proxy enabled in Eclipse
Next Topic:Install issue in TPTP
Goto Forum:
  


Current Time: Fri Jul 25 19:10:42 EDT 2014

Powered by FUDForum. Page generated in 0.02633 seconds