|Re: Kind of events used in SWTBot [message #32429 is a reply to message #32394]
||Thu, 16 April 2009 09:09
| Ketan Padegaonkar
Registered: July 2009
The great Morphious once said: What is "real"? How do you define "real"? |
If you're talking about what you can feel, what you can smell, what you
can taste and see, then "real" is simply electrical signals interpreted
by your brain...
SWTBot feeds fake events to the event listeners to make your application
think it came from a real human being clicking on the UI.
The side-effects of this are that since swtbot just 'pumps' events, if a
verifylistener does not want to let this event go through by setting
event.doIt = false, swtbot does not understand this.
The other side-effect is what you mention in point 3 below, and swtbot
tries to mitigate this by doing a setFocus() before performing any
operations on the widget.
Sending real events would mean that swtbot does exactly what the user
does, the click is real flesh and meat and not mere electrical signals.
On 16/4/09 13:54, Hans Schwaebli wrote:
> I am no event expert, so I have some questions.
> In your EclipseCon 2009 materials you wrote SWTBot uses simulated
> events, not real ones.
> 1. Can you please explain why the events are only simulated and not real?
> 2. And you wrote that you might use real events in future in SWTBot.
> Why? What would be the advantage? Are there any disadvantages of real
> events compared to simulated ones?
> 3. It seems that here and there SWTBot does not realistically use events
> compared to a human using the GUI. For example it is possible in SWTBot
> to select the tree item in the Package Explorer view, but the view has
> no focus after that event, which can never happen if a user selects a
> tree item in a view. Would that be solved with "real" events?
Powered by FUDForum
. Page generated in 0.01828 seconds