|Re: Sometimes SWTBotTable.select sends event.item=Null in SelectionEvent [message #1749340 is a reply to message #1749167]
||Mon, 05 December 2016 16:36
| Patrick Tasse
Registered: July 2009
Thanks for reporting this. It doesn't seem like SWTBot is behaving like a real SWT application.
What I see testing with real user actions is that there shouldn't be any SelectionEvent at all sent to the previously selected item when you select a new one.
The only time that a SelectionEvent is sent to an unselected event is when you specifically unselect it (e.g. Ctrl+click or Ctrl+space) and this is only possible if the table has SWT.MULTI style, you can't unselect when the table is SWT.SINGLE.
Also the unselect() method unselects all, presumably if it is a SWT.MULTI table with many selected items, you would have to either unselect each item one by one, or select one item and then unselect it. The method now unselects all items then sends only one selection event. The method also doesn't check that it's a SWT.MULTI table.
SWTBotTree also has the same issues, even more, it doesn't set the event.item at all on selection.
So there's a few bugs here, would like to open a bug report?
Powered by FUDForum
. Page generated in 0.01369 seconds