Serguei Cambour wrote in post #1074435:
> Just a piecec pf code to create a screen shot:
>
> private void takeScreenShot(RuntimeException e, String fileName) {
>
>     File screenShot = ((TakesScreenshot)
> driver).getScreenshotAs(OutputType.FILE);
>
>     try {
>
>         FileUtils.copyFile(screenShot, new File(fileName + ".png"));
>
>     } catch (IOException ioe) {
>
>         throw new RuntimeException(ioe.getMessage(), ioe);
>
>     }
>
>     throw e;
>
> }

Thank you for the help, sorry I forgot to mention that I'm using ruby 
and I need screenshots to be included into RSpec html reports.

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to