How to test a Web site by driving Konqueror thru its equivalent of Automation?

David Faure faure at kde.org
Sun Jun 20 21:46:07 BST 2004


On Sunday 20 June 2004 18:08, Phlip wrote:
> David Faure wrote:
> 
> >  sleep 2m
> >  dcop konqueror-$pid html-widget1 evalJS "....."
> > 
> >  ...
> > 
> >  sleep 5m
> >  kill $pid
> > 
> > You can also use "dcop konqueror-$pid $obj
> > activateNode" to activate
> > a link after giving it focus with javascript.
> 
> If a test fails can that present a big, un-ignorable
> error message?

Sure, since that can be done in Javascript.

> Can that bubble up the pass/fail bit to the calling
> environment?

Yes, the evalJS call returns the value as evaluated by javascript. You can
simply return false or true at the end of the test.

> Can we take out the 7 minutes of sleep, so we can put
> this under an editor's test button and run it after
> every 1~10 edits of a Web site's source? 

Yes - forget the last sleep, that's my own use case, you don't need it.
The first one, needs to be replaced with a javascript loop waiting for
e.g. readyState as a mentionned.

> I'm after Test-Driven Development here...
I see.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kfm-devel mailing list