|Re: PROPERTIES OF COMPONENTS [message #23102 is a reply to message #23059]
||Thu, 19 February 2009 17:30
| Ketan Padegaonkar
Registered: July 2009
Yes, developers need to setData on components when they create it.|
If you need to set components as an swtbot user, then you already have
the component and setting IDs don't have much value.
One recommendation is to keep use of IDs to a minimum, because they do
get in the way of readability because there's no way to figure out what
widget the ID corresponds to.
SWTBot provides for a far richer API to access widgets and you can find
widgets using regexes, text, within groups, with labels, or a
combination of these.
Look at one of the methods with the SWTBot class to see how matchers are
used, I suspect that you can probably do away with matchers than IDs.
Luis Miguel wrote:
> I can not use these
> methods:org.eclipse.swt.widgets.Widget.setData(String key, Object
> value). What version of SWTBot have you got? Or this method is used by
> developers when they create the component?
> Can I set my own key with this method? For example, I have an
> application with two inputtexts and a button... If I want to identify
> the second input with a unique way, Can I use this method?
> Is there any snnipet about this?
> Thanks again.
> Luis Miguel
Powered by FUDForum
. Page generated in 0.11727 seconds