Ketan Padegaonkar a écrit :
> I've always been having thoughts about having a better api to access  
> menus and trees. This is currently what most people do:  
> bot.menu("file").menu("new").menu("other").click(); and similar stuff  
> for trees as well.
>
> How about: bot.menu("file>new>other").click() instead ?
>   
It looks like a syntactic sugar, which could be interesting.
> This api would mean better and more concise API for most users. In  
>   
In facts, I use SWTBot tests for non regression purposes and the way I 
write them also documents the awaited behavior of the application for 
those people who may succeed me in that job. So I will continue to use 
the old style.

> case you have the character ">" as part of the menu/tree item's text,  
> an override would be nice so you could do something like:
> bot.menu("file/new/other", '/').click() instead.
>   
This will be less readable so I am not convinced of its interest at all.
It seems the proposal induces problem and complexity (as the '>' could 
be inadapted) a little greater than the initial interest.
> This should be trivial to implement since it merely involves splitting  
> the string and chaining the call in a loop, but may break things for  
> some users, so I'm contemplating this only for 2.0.
>
> Feel free to drop in any ideas or suggestions that you may have around  
> this API.
>
> -- Ketan
>   
-- 
Cordialement

Vincent MAHÉ

Ingénieur Plate-forme OpenEmbeDD - http://openembedd.org
IRISA-INRIA, Campus de Beaulieu, 35042 Rennes cedex, France
Tél: +33 (0) 2 99 84 71 00, Fax: +33 (0) 2 99 84 71 71


-------------------------------------------------------------------------
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

Reply via email to