Titus Brown | 13 Apr 2006 06:41
Picon
Favicon

Re: Twill and JavaScript

On Wed, Apr 12, 2006 at 01:59:11PM -0400, Do, Uy N wrote:
-> I know Twill doesn't support JavaScript for now. 
-> However, is there any way to overcome that? Like integrate Twill with
-> some other tools, etc so that we still can write twill test with
-> javascript enabled websites?
-> I checked IanBlocking's Twill with Javascript demo but it seemed didn't
-> do much.

I don't have any good ideas on this front ;(.   I do have ideas on how
to explicitly test the functionality *behind* AJAX-y sites, but I
haven't had a chance to play around with any such sites yet personally.

Does anyone else have any thoughts?

cheers,
--titus
Stephen Thorne | 13 Apr 2006 07:02
Favicon

Re: Twill and JavaScript

Titus Brown wrote:
> On Wed, Apr 12, 2006 at 01:59:11PM -0400, Do, Uy N wrote:
> -> I know Twill doesn't support JavaScript for now. 
> -> However, is there any way to overcome that? Like integrate Twill with
> -> some other tools, etc so that we still can write twill test with
> -> javascript enabled websites?
> -> I checked IanBlocking's Twill with Javascript demo but it seemed didn't
> -> do much.
> 
> I don't have any good ideas on this front ;(.   I do have ideas on how
> to explicitly test the functionality *behind* AJAX-y sites, but I
> haven't had a chance to play around with any such sites yet personally.
> 
> Does anyone else have any thoughts?

Most of my AJAXy stuff is stuff like:

function doStuff() {
var d = loadJSONDoc('/some/explicit/path?' + 
queryString(getElement('myform')));
d.addCallback(function (response) {
   replaceChildNodes('message', response.message);
   replaceChildNodes('sometable', map(show_row, response.some_data));
});
}

If you don't know mochikit, that code basically does

- Browser asks for /some/explicit/path?all=form&fields=here
- Server responds with "{mesasge:'foo'}"
(Continue reading)


Gmane