I know that there is something similar in Watir-WebDriver or will soon be -
let's make sure that we would use the same API. I'd prefer having second
element just as a Watir::Element instance, e.g. something like this:

b.div(:id => "something").drag_to(b.div(:id => "something_else"))

This approach is good since specifying the second parameter is as flexible
as specifying the first and it's consistent with everything else in the
existing API.

Are you planning to implement these methods? In that case, as i already
mentioned, let's make sure we're using the exact same API in Watir and
Watir-WebDriver. I'd recommend to create first some examples into WatirSpec
:)

Jari, what are you thoughts and comments on this?

Jarmo

On Tue, Jan 17, 2012 at 2:15 AM, Charles S van der Linden
<[email protected]>wrote:

> So I was watching some stuff for Windmill which appears to be some
> python based automation stuff, for all I know it's webdriver under the
> hood.
>
> Slick UI, record and playback (sigh don't get me started.) and a mix
> of identifying stuff by 'clean' means like ID, Class, or Name along
> with a ton of identification done by xpath (sigh, again don't get me
> started)
>
> No abstraction layer as far as I could tell.  bunch of other things
> I'd consider shortcomings, but a site rife with good demo videos and
> has that sexy appeal that people who've not been through the
> automation wringer always fall for.
>
> But with what did get my attention was their drag and drop stuff,
> which is becoming more and more in demand.
>
> I think this is the kind of thing that can help someone who wants to
> use watir to fight back against someone being seduced by a sexy UI
> that creates brittle tests.
>
> To start off with I think we ought to consider supporting two things I
> saw them demo  They called their methods "dragDropElem" and
> "dragDropElemToElem".  Not enthralled with the names, but like the
> functionality
>
> The first was fairly easy  just a drag and drop relative to the
> current location,  e.g.  browser.div(:how =>
> 'what').drag_relative(x,y)
> The second was more useful, dragging one element onto another.  e.g.
> browser.div(:how => 'what').drag_onto(-an element-)
>
> The question I would have for the second version is how to specify the
> target element?  Do you use some format like (:tag => 'div', :id =>
> 'drag_target')  or something different?
>
> (I dropped 'drop' from the method names since I think it's implied,
> once you start dragging what else can you do but drop the thing
> someplace.  Not in any way married to those names, just trying to give
> us something to work with.
>
> They give some actual useful examples in terms of manipulating slider
> controls where this kind of thing becomes pretty useful.  I think this
> is the site (or a version of it) they were automating against.
> http://yaxu.org/synth/jquery/demos/functional/  it would be
> interesting to see if you can easily work those controls with watir
> without a drag-drop capability.
> _______________________________________________
> Wtr-development mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-development
>
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to