jquery windmill search vs a more generic option

2 views
Skip to first unread message

Aaron

unread,
Nov 5, 2009, 8:03:00 PM11/5/09
to Windmill Developers
First, windmill is awesome. I can't begin to express how much
appreciation I have for such a full featured system for testing all
this fancy browser UI stuff.

So, I've been writing a few tests, and I must admit it took me a while
to figure out the jQuery option. There doesn't seem to be any
documentation on what's expected in the input, and I had to dig
through the windmill source to figure it out. For those searching the
interwebs, here's the answer:

the jquery input in a windmill test expects you to enter the jquery
selector that returns a *SINGLE* element and, further, your entry will
be prefixed with "jquery.find". That means that you enter something
like this:

("div.foo a.bar")[0]

which gets translated into

jquery.find("div.foo a.bar")[0]

Ok, so I figured that out, but I'd like to make a suggestion (other
than that this feature get documented or, if it is documented, that it
be easier to find).

Why not have a javascript option for finding elements in addition to
name, id, classname, etc. i.e. let me put in a line of javascript that
returns an element. Then I could do:

document.getElementById('foo')

if I really wanted to. Further, I could use the JavaScript tools
already existent in my page including referencing variables defined.
For example, our site uses MooTools. I have numerous methods available
to me to find specific elements, including mechanisms not available to
jQuery (i.e. not selector based mechanisms). I could, for example,
find an element via element storage or traversing instances of
classes. My point is, allowing me to type in vanilla JavaScript here
and return an element would make things more flexible.

These are just suggestions, and I want to reiterate how much I
appreciate the richness of the Windmill testing suite. It's seriously
awesome stuff.

Aaron Newton

Adam Christian

unread,
Nov 5, 2009, 9:28:39 PM11/5/09
to windmi...@googlegroups.com
All very good points, I totally forgot to document the jquery selector
after the last release, so that fully on me :)

Adding a javascript locator wouldn't be hard, its a few lines of code
in the lookupNode function, I will put that on my list of things to
do, or you can give me a working github branch with the feature in it :)

I appreciate the feedback, and I'm glad everyone is finding the jquery
integration so useful.

Thanks!

Adam
Reply all
Reply to author
Forward
0 new messages