Can you please take a look at this issue?
http://swtbot.org/bugzilla/show_bug.cgi?id=67

I would like to suggest improving SWTBot so that it throws an exception when it 
finds more than one Widget matching. There is already such an exception if 
there is no widget matching.

Currently SWTBot simply returns the first widget in the collection if no index 
has been passed. This means that it is pure luck whether the right widget is 
found or not. You cannot be sure. And next day another widget could be 
returned, depending on internal search algorithms or UI layout. A test could 
work one day and break on another day without any apparent change.

Throwing an exception if more than one widget was found would help the 
programmer to detect such problems earlier und to be advised to use an index or 
- even better in my eyes - to use unique widget IDs which are not yet supported 
in SWTBot.

That feature does not necessarily break existing code as I have shown in the 
Bugzilla issue.

So this is meant for discussion. Do you think like I wrote, are you against 
that feature or do you don't care about it?



      
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
SWTBot-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse

Reply via email to