|
Re: Widget Resolver help needed [message #112803 is a reply to message #112349] |
Wed, 19 September 2007 14:34 |
Joe Toomey Messages: 79 Registered: July 2009 |
Member |
|
|
Hi Matthias,
First, thanks very much for helping out here in the newsgroup. It is
nice to see non-committer contributors giving back by helping people who
are new to the project, and the community of over-burdened committers
greatly appreciates your help. :-)
I haven't implemented my own widget resolvers, but I have done a lot of
work on the TPTP Test Project over the years, and I think I can help
with some of your questions.
> - I can write my custom widget resolver code. But how exactly is it
> integrated in TPTP?
> - Widget resolvers are entered into plugin.xml of the
> org.eclipse.tptp.test.auto.gui plug-in. Is this a necessary step for a
> custom resolver?
Widget resolvers are integrated/registered with TPTP by extending the
extension point "org.eclipse.tptp.test.auto.gui.widgetResolver".
Extension Points are the eclipse mechanism to expose extensibility to
other plug-ins. It is not necessary for you to make changes to the
org.eclipse.tptp.test.auto.gui plug-in in order to add a new widget
resolver. Rather, in your own plug-in, you should declare a manifest
dependency on org.eclipse.tptp.test.auto.gui, and then create your an
extension of the org.eclipse.tptp.test.auto.gui.widgetResolver extension
point in your plug-in as well. When the AGR gets the list of all
registered widget resolvers, it does so by asking eclipse to enumerate
all extensions of this extension point, and the resulting enumeration
will contain your contributions as well as those in the
org.eclipse.tptp.test.auto.gui plug-in.
> - How do I assure that e.g. a button is not recorded by the nontrivial
> resolver but by my custom resolver?
If the nontrivial resolver currently returns non-null for getUniqueID()
(meaning that it believes it can properly identify the widget), then you
should register your widget resolver with a higher priority than the
nontrivial resolver (so your resolver gets called first.) If you put
yourself first in the list of resolvers (highest priority), be sure to
make your methods fail quickly when they determine that they can not
identify or find a widget (so you don't slow down the record and
playback significantly.)
You may also want to take a look at the Adaptive widget resolver, which
is customizable without requiring coding. See
http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI.html#2.4.1
(and the source code) for more information.
Hope this helps,
--Joe
|
|
|
Re: Widget Resolver help needed [message #113756 is a reply to message #112803] |
Mon, 01 October 2007 13:04 |
Matthias Wiskow Messages: 25 Registered: July 2009 |
Junior Member |
|
|
Hi Joe,
thanks for your answer which really helped a lot!
Matthias
Joe Toomey wrote:
> Hi Matthias,
>
> First, thanks very much for helping out here in the newsgroup. It is
> nice to see non-committer contributors giving back by helping people who
> are new to the project, and the community of over-burdened committers
> greatly appreciates your help. :-)
>
> I haven't implemented my own widget resolvers, but I have done a lot of
> work on the TPTP Test Project over the years, and I think I can help
> with some of your questions.
>
> > - I can write my custom widget resolver code. But how exactly is it
> > integrated in TPTP?
> > - Widget resolvers are entered into plugin.xml of the
> > org.eclipse.tptp.test.auto.gui plug-in. Is this a necessary step for a
> > custom resolver?
>
> Widget resolvers are integrated/registered with TPTP by extending the
> extension point "org.eclipse.tptp.test.auto.gui.widgetResolver".
> Extension Points are the eclipse mechanism to expose extensibility to
> other plug-ins. It is not necessary for you to make changes to the
> org.eclipse.tptp.test.auto.gui plug-in in order to add a new widget
> resolver. Rather, in your own plug-in, you should declare a manifest
> dependency on org.eclipse.tptp.test.auto.gui, and then create your an
> extension of the org.eclipse.tptp.test.auto.gui.widgetResolver extension
> point in your plug-in as well. When the AGR gets the list of all
> registered widget resolvers, it does so by asking eclipse to enumerate
> all extensions of this extension point, and the resulting enumeration
> will contain your contributions as well as those in the
> org.eclipse.tptp.test.auto.gui plug-in.
>
> > - How do I assure that e.g. a button is not recorded by the nontrivial
> > resolver but by my custom resolver?
>
> If the nontrivial resolver currently returns non-null for getUniqueID()
> (meaning that it believes it can properly identify the widget), then you
> should register your widget resolver with a higher priority than the
> nontrivial resolver (so your resolver gets called first.) If you put
> yourself first in the list of resolvers (highest priority), be sure to
> make your methods fail quickly when they determine that they can not
> identify or find a widget (so you don't slow down the record and
> playback significantly.)
>
> You may also want to take a look at the Adaptive widget resolver, which
> is customizable without requiring coding. See
> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI.html#2.4.1
> (and the source code) for more information.
>
> Hope this helps,
> --Joe
|
|
|
Powered by
FUDForum. Page generated in 0.04522 seconds