[Baypiggies] Windmill

Adam Christian adam at osafoundation.org
Fri Oct 12 20:43:51 CEST 2007


Sorry about the email weirdness here, I had to subscribe to the list  
to respond.

The architecture that we use to do the drag and drop works as follows:

The service gives the windmill IDE a locator for the element to be  
dragged and the destination of where to drag it, we then compute the  
offsets, then we use the offsets and a mousemove event to get the  
cursor over the element and do a mousedown. We then do another  
mousemove to the calculated coordinates of the destination element  
and do a mouseup, letting go of the div (our drop).

Right now there is a function in the windmill controller which allows  
you to pass a function along with your start element and destination  
element, called windmill.controller.dragDrop.

I plan to put in a few hours this weekend to implement a generic drag  
drop function into the record that would allow you to record a drag  
drop motion against a page with no offsets that would work for the  
most basic scenarios. The next iteration of this would be allowing  
you to do your recording against a simple page, then pass offset  
values or a function of offsets to make everything work correctly  
against a more complex page.

There are instructions on how to write an extension to windmill here:
http://windmill.osafoundation.org/trac/wiki/BookChapter-7-Extensions

An example of our Cosmo specific drag drop (which has to pull ID's  
dynamically from a javascript hash):
http://windmill.osafoundation.org/trac/browser/windmill/trunk/ 
windmill/js/extensions/extensions.js

line 56, function windmill.controller.extensions.cosmoDragDrop

Hopefully this helps, and I will post again when I have more in the  
way of an out of the box drag drop recorder in the trunk.

Thanks for your interest,

Adam


____
Hi,

Windmill looked pretty awesome. This was probably covered, but how does
it tell communicate with the browser to simulate drag and drop and such?
I'm definitely going to install it and see if I can put it to use. I
thought it was an interesting presentation.

Bjorn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/baypiggies/attachments/20071012/0a855ecb/attachment.htm 


More information about the Baypiggies mailing list