On 09-Oct-08, at 10:37 AM, mpauser wrote: > > Amazing~ With your example, I have two additional questions: > > List findControls = finder.findControls(shell.widget, new > DecoratingAndMatcher(ClassMatcher(Button.class), new > RegexTextMatcher("^Choice 2.*")), true); > > #1: How do I get this instance of "finder".
Most objects in SWTBot are lightweight objects and are passed in via the constructor. You can just create an instance of Finder, or bot.getFinder() will give you an instance. > #2: How can I create a button instance from that? You have > SWTBotRadio(Button), SWTBotCheckBox(Button) but no new > SWTBotButton((Button) > controls.get(0)). In looking at your javadocs, the SWTBotButton > requires an > instance of a finder -- and I go back to question #1. > > I saw that you had mentioned that you were considering making > SWTBotButton > "easier" to use -- hopefully like SWTBotRadio et. al. You are right buttons do not have a constructor to inject the widget, you could subclass the widget -or- If you're willing to take the latest from trunk as a lot of users do, I'll check that into trunk. > Also, don't forget sending keystrokes or sending mnemonics This requires a bit more analysis, as to how many users need to send keystokes like mnemonics, tabs etc, what kind of API is needed, so that it's just enough for 80% of the users, but still extensible for the rest of the 20%. This deserves a different conversation and it would be better if we have that conversation on another thread. -- Ketan ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ SWTBot-users mailing list SWTBot-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/swtbot-users http://swtbot.org/ - a functional testing tool for SWT/Eclipse