Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » MouseEvents with SWTBot
MouseEvents with SWTBot [message #485570] Sun, 13 September 2009 18:50 Go to next message
speedracer  is currently offline speedracer Friend
Messages: 19
Registered: August 2009
Junior Member
hello,

is there a chance to make MouseEvents like MouseDown, MouseMove or MouseUp with SWTBot.

Or can I write a methode, with a syncExec Thread and there call the normal swt mouse events.?I tried that, but it does not function.
But I think I maked an error.




Re: MouseEvents with SWTBot [message #485652 is a reply to message #485570] Mon, 14 September 2009 10:54 Go to previous messageGo to next message
Daniel Weber is currently offline Daniel WeberFriend
Messages: 51
Registered: July 2009
Member
Hi,

speedracer wrote:
> is there a chance to make MouseEvents like MouseDown, MouseMove or
> MouseUp with SWTBot.

There are methods generating mouse events in org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot. All of them are either private (mouseDown, mouseUp) or package-visible (moveMouse).

> Or can I write a methode, with a syncExec Thread and there call the
> normal swt mouse events.?I tried that, but it does not function. But I
> think I maked an error.

What do you need the mouse events for?

Regards,
Daniel
Re: MouseEvents with SWTBot [message #485668 is a reply to message #485570] Mon, 14 September 2009 12:25 Go to previous messageGo to next message
speedracer  is currently offline speedracer Friend
Messages: 19
Registered: August 2009
Junior Member
Hello,

I want to try to implement a drag and drop function.

This function should in the first step work for swtbot treeitems
1. I get the bounds of the items,
2. I generate and fired a MouseMove event to item1
3. I generate and fired a MouseDown Event
4. igenerate and fired a MouseMoveEvent to item2
5 I generte and fired a MouseUp Events

Currently i don't know a better approach to to drag and drop, but for some of my tests I need this function.

Is there a chance to do that.

Can anybody tell me a better approach for implement drag and drop function?

Can I get an example how I can generate an swtbot Mouse Event?
Re: MouseEvents with SWTBot [message #485690 is a reply to message #485668] Mon, 14 September 2009 13:35 Go to previous messageGo to next message
Daniel Weber is currently offline Daniel WeberFriend
Messages: 51
Registered: July 2009
Member
Hi again,

OK, drag and drop was the answer I expected :)

I have a basic implementation of drag and drop running and I'm preparing
to make it available. Stay tuned...

Cheers,
Daniel
Re: MouseEvents with SWTBot [message #485710 is a reply to message #485668] Mon, 14 September 2009 15:03 Go to previous messageGo to next message
Daniel Weber is currently offline Daniel WeberFriend
Messages: 51
Registered: July 2009
Member
Hi again,

> I want to try to implement a drag and drop function.

I just uploaded my Drag and Drop related changes to

http://github.com/DanielWeber/swtbot/tree/dnd

Did you have any success in building your own swtbot binaries? If so,
you can build from these sources and check if this implementation works
for you.

A patch has been attached to the Bug Report:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=285271#c3

I only tested dnd from text to text and tree to tree, but it's a start.

All kinds of feedback are welcome :-)

Cheers,
Daniel
Re: MouseEvents with SWTBot [message #485788 is a reply to message #485710] Tue, 15 September 2009 02:09 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
I like your approach of asking a widget to drag and drop itself on top
of another widget:

sourceText.dragAndDrop(targetText);

Will work on this patch over the next week.

Cheers!
--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr


On 14/09/09 8:33 PM, Daniel Weber wrote:
> Hi again,
>
>> I want to try to implement a drag and drop function.
>
> I just uploaded my Drag and Drop related changes to
>
> http://github.com/DanielWeber/swtbot/tree/dnd
>
> Did you have any success in building your own swtbot binaries? If so,
> you can build from these sources and check if this implementation works
> for you.
>
> A patch has been attached to the Bug Report:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=285271#c3
>
> I only tested dnd from text to text and tree to tree, but it's a start.
>
> All kinds of feedback are welcome :-)
>
> Cheers,
> Daniel
Re: MouseEvents with SWTBot [message #485801 is a reply to message #485570] Tue, 15 September 2009 06:54 Go to previous message
speedracer  is currently offline speedracer Friend
Messages: 19
Registered: August 2009
Junior Member
Hello Daniel,

yes I had success binaries and could use your code for drag and drop. And it works for me.

Thanks for this patch. That saves me a lot of time. Smile



Previous Topic:Using "Headless Testing Framework" feature in a product
Next Topic:Table items background color doesn't work
Goto Forum:
  


Current Time: Wed Apr 24 14:30:28 GMT 2024

Powered by FUDForum. Page generated in 0.04229 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top