We are using RSpec to run our tests (http://rspec.info) and I've
created my own HTMLFormatter class which extends their
Spec::Runner::Formatter::HtmlFormatte and then using
#extra_failure_content method, which will be invoked if some test
fails by RSpec itself. So, if test fails, I'm also checking if page
had any JS errors and then make a screenshot of it. Otherwise (if test
passes) JS errors will be ignored.

Jarmo

On Oct 16, 5:30 am, dt_nz <david.tay...@sungard.com> wrote:
> Hi
> To capture a java script error, how do you call theses methods.  Do
> you have a separate thread that is always running
> save_javascript_error in a loop, or is save_javascript_error called
> after each action on a page?
>
> We have an existing framework that runs a lot of tests in our
> regression runs and am ideally looking for a solution to incorporate
> it into our existing structure.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to