Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums'Click' at given coordinates inside a RCP View
https://www.eclipse.org/forums/index.php/mv/msg/441331/990016/#msg_990016
I'm fully new to SWTBot, so sorry in case my question is too 'simple' ...
I have an Eclipse RCP app, and I have a view 'V', inside a perspective 'P'.
This view mainly displays a fixed background image, and reacts if the user clicks at some given places, by checking the coordinates passed through the mouseDown method.
I'd like to write a test for that, using SWTBot, but I don't know how I could send a 'click' event directly at some coordinate X,Y of my view.
Any suggestions welcome ...
Thanks & best regards,
Bernard.
]]>Bernard Sarter2012-12-10T13:53:39-00:00Re: 'Click' at given coordinates inside a RCP View
https://www.eclipse.org/forums/index.php/mv/msg/441331/990192/#msg_990192
> Hello,
Hi,
> This view mainly displays a fixed background image, and reacts if the
> user clicks at some given places, by checking the coordinates passed
> through the mouseDown method.
>
> I'd like to write a test for that, using SWTBot, but I don't know how I
> could send a 'click' event directly at some coordinate X,Y of my view.
This is quite a low-level operation. SWTBot is good at manipulating SWT
and Eclipse widgets and concepts.
I think the best way to achieve what you want is directly to send an SWT
Event to this Image.