|Testability of nebula widgets (Re: Finding n-th widget of any type) [message #593320]
||Thu, 22 January 2009 09:33
| Ketan Padegaonkar
Registered: July 2009
(CC'ing the nebula newsgroup for more inputs on this)
There have been numerous requests from SWTBot users for adding support
for testing Nebula widgets. This happens to be one such case.
One of the things that prevents testability is when nebula exposes its
internals by way of exposing individual SWT controls and not 'nebula
An example would be the date/time controls. Users would ideally want to
interact with some form of a DateTimeComposite as a single widget that
performs all operations pertaining to date and time and not as a set of
individual widgets that they need to orchestrate.
Can the nebula team help in this regard ? Can I help in any way in this?
On 22/1/09 14:04, Hans Schwaebli wrote:
> I cannot find the text field (which is "decorated" by Nebula using
> listeners) by label. So I was looking for an alternative way, which is
> described in this thread. I will try to find it by ID, maybe that will
> work, at least as an workaround. Maybe it was not the best decision of
> the Nebula design team not to use inheritance, since their classes are
> widgets, so they should extend the Widget class I think.
> Ketan Patel wrote:
>> I don't see how you can find FormatterText. You will only be able to
>> find the Text since that is the only thing known by the Composite
>> holding it. Unless you have ways to hook into the JVM itself to
>> inspect the objects.
>> Hans Schwaebli wrote:
>>> Ketan Patel wrote:
>>>> Can you provide an example where swt widget does not extend the
>>>> Widget class?
>>> Nebula widgets, for example FormattedText. Instances are created by
>>> passing a Text object when creating a new Nebula widget. They are
>>> loosely coupled with listeners and not by extension or aggregation.
Powered by FUDForum
. Page generated in 0.12840 seconds