windowlicker status

44 views
Skip to first unread message

rusty

unread,
May 24, 2010, 7:26:33 PM5/24/10
to windowlicker-users
Hi there -

I''ve been using the windowlicker libraries for a while and am
wondering if development is still active.

It's a great tool, but I can't seem to find much documentation on it.

Thanks,
rusty

--
You received this message because you are subscribed to the Google Groups "windowlicker-users" group.
To post to this group, send email to windowlic...@googlegroups.com.
To unsubscribe from this group, send email to windowlicker-us...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/windowlicker-users?hl=en.

Nat Pryce

unread,
May 26, 2010, 3:57:06 AM5/26/10
to windowlic...@googlegroups.com, windowlicker-users
Hi Rusty. It depends which bit. Windowlicker core -- the polling/timeout/gestures -- is in use and occasional development. Windowlicker Web is in use and Rob Westgeest has recently joined asxa committer to add some new features. Windowlicker Swing has stagnated I'm afraid.

Basically, Windowlicker has been a tool I & a few colleagues take from job to job. I'd definitely welcome more contributions, either code or documentation.

Rob Westgeest

unread,
May 26, 2010, 5:38:26 AM5/26/10
to windowlic...@googlegroups.com
Hi Rusty,

I have been working with windowlicker web recently. I specifically used
it on JSF and found some problems with that (which where actually more
webdriver related). Yet I added some features I needed in that respect
but haven't committed them yet. Planning to do so later this week.

Anyway, since I am working with windowlicker at the moment, I might be
able to help you out with questions you have.

Cheers

Rob

rusty

unread,
May 26, 2010, 9:36:44 AM5/26/10
to windowlicker-users
@Nat - I came to use windowlicker through your GOOS book, which is
really great, by the way.

If I get to the point where I understand it enough to write up some
documentation I would be happy to do that.

@Rob - My question may be basic. I'm testing an autocomplete field
(implemented with the jQuery autocomplete extension) and I just want
to simulate pressing the down key and then check the value of the
option in focus.

I don't have it in front of my right now, but I think AsynchWebDriver
has basic user commands like "type" but how do you execute other
commands like keyDown and keyUp or just keyPress?

Thanks in advance.

rusty

Jacob

unread,
May 26, 2010, 10:43:51 PM5/26/10
to windowlicker-users
I answered my own question about how to "simulate pressing the down key and then check the value of the
option in focus" when doing an AJAX autocomplete. 

The answer is I don't need to do that. 

In general I had more of an "aha!" moment about how I should be thinking about doing the end to end testing on the browser.

Instead of thinking of a user actually clicking keys and looking at the screen, I need to just be going straight for the DOM and making assertions about values in the DOM elements. 

So the combination of AsyncWebDriver and AsyncElementDriver should be enough for most page testing. I just pass the criteria to the element() method of AsyncWebDriver which will give me my AsyncElementDriver to make assertions about. 

For testing the autocomplete with jQuery, I do something like this: 

AsyncWebDriver browser = new AsyncWebDriver(new UnsynchronizedProber(), new FirefoxDriver());
AsyncElementDriver out; 

public void typePartialBandName() {
        out = browser.element(id("band_name"));
out.type("Ele");

        out = browser.element(xpath("//div[@class='ac_results']/ul/li[1]"));
out.assertText(containsString("Electrelane"));

out = browser.element(xpath("//div[@class='ac_results']/ul/li[2]"));
out.assertText(containsString("Electric Light Orchestra"));

        browser.quit();
}

The jQuery autocomplete extension creates a div with class "ac_results" and I only need to concern myself with which values are present in that list. 

I had my epiphany trying to do it first with Selenium RC. Then doing it with windowlicker made a lot more sense. 

And windowlicker makes it more elegant, which I suppose is the goal in providing a higher level wrapper around the Selenium API. 

Rob Westgeest

unread,
May 27, 2010, 2:07:42 AM5/27/10
to windowlic...@googlegroups.com
> @Rob - My question may be basic. I'm testing an autocomplete field
> (implemented with the jQuery autocomplete extension) and I just want
> to simulate pressing the down key and then check the value of the
> option in focus.
>
> I don't have it in front of my right now, but I think AsynchWebDriver
> has basic user commands like "type" but how do you execute other
> commands like keyDown and keyUp or just keyPress?
I used \n to 'simulate' the enter key, but while that may work for enter
and tab, it (may or) may not be possible to use that to execute more
complicated key's like key down and key up. My guess is that if your key
sequence can be represented as a java.lang.CharSequence, type might just
work.

WindowLicker's web package bases it's functionality on (a bit of an old
version i believe, of) webdriver. So here's how i went about stuff i
needed that did not work straight away, or that appeared to be not
available at all. Look at the webdriver API to see if your needed
functions are available there (e.g. your keypresses). If so (and when
you'r sure that AsyncElementDriver does not expose that functionality,
then extend AsyncElementDriver. I started with subclassing that one, as
i was not a committer at first, which made me subclass AsyncWebDriver as
well to return my subclassed AsyncElementDriver.

I hope this helps. Let me know, if and how you solved it.

Cheers

Rob

Rob Westgeest

unread,
May 27, 2010, 2:10:30 AM5/27/10
to windowlic...@googlegroups.com
Great stuff!

> To unsubscribe from this group, send email to windowlicker-users
> +unsub...@googlegroups.com.

rusty

unread,
May 27, 2010, 9:33:14 AM5/27/10
to windowlicker-users
Thanks Rob.

I did consider extending AsycElementDriver too. I'm looking into
webdriver - which appears to have merged with Selenium to create
Selenium 2:
http://google-opensource.blogspot.com/search/label/webdriver

Using the DOM elements explicitly (as I ended up doing) means if I
change the way I implement autocomplete I will need to change the test
code.

Using the key commands as you suggest, I'll need to detect what values
are in focus or selected after the key strokes. So far I can't find a
way to do that and maybe it's not possible.

Jacob
(an alias is meaningless on these boards)

Reply all
Reply to author
Forward
0 new messages