On Oct 18, 12:04 am, Mikeal Rogers <
mikeal.rog...@gmail.com> wrote:
> You can do a couple things.
> 1) You can pull any information you would like out of the page using an
> execJs call.
What call would you suggest to get the current, full page source?
I.e. if I have javascript snippets that modify the DOM, firefox's
'save page source' will save the original, unmodified html. How should
I get the 'actual', modified one?
> 2) You can call in to a Python library that will take a screenshot of the
> entire desktop.
>
> 3) Depending on the browser, we could work on some code that took a
> screenshot using canvas.
There are firefox extensions that take a 'full screenshot' of the
given page (which might be taller than what fits on the page), is
there some way such an extension could be called with execJS? (I'm not
really familiar with either javascript or firefox extension
development, but I would assume that a javascript snippet included in
the page would not get access to the extensions installed in the
browser.)
> 4) We can work on better django integration to add a listener somewhere that
> notifies windmill of the error page generation and takes all the raw data
> sent to the page and sends it to a different windmill debugging tool.
Since django sends the error page with an http status code of 500
('Internal Server Error'), I think it would be enough if getting a
non-ok http status code would trigger a windmill error / test
failure. Is this possible? I guess this boils down to two questions:
1) adding checks that are to be run on every page, like twill's
require extension
(
http://twill.idyll.org/extensions.html#require-assert-that-specific-
conditions-hold-after-each-page-is-loaded)
I.e. allow registering some python method (in setup_module, for
example) that is run after, say, every waits.forPageLoad, so that I
can specify these checks in one place and have them being run
everywhere.
2) checking the http status code. According to some pages I found via
google, these status codes are not available to javascript in the
browser. Can windmill check somehow despite this?
Other similar 'check for all page-load' checks that might be
interesting:
- check that page validates
- check that links on page are not broken
- check that site-wide navigation is present on page (with
a .assertNode(), for example)
Thanks,
Daniel