On Monday, March 18, 2013 6:32:59 AM UTC-7, Željko Filipin wrote:

> On Sun, Mar 17, 2013 at 9:39 AM, Sohail Mirza <[email protected]<javascript:>
> > wrote:
>
>> how to save screenshot
>
>
> This should help: http://watirwebdriver.com/screenshots/
>
> Željko
> --
> https://leanpub.com/watirbook
>

There was also a good posting on this subject in the Watirmelon 
blog<http://watirmelon.com/2011/08/04/capturing-screenshots-in-watir-webdriver-cucumber/>,
 
 and I found some of the code in this blog posting from the Two Four One 
blog<http://twofourone.blogspot.com/2011/04/making-your-cukes-more-awesomer-with.html>
 very 
useful when it comes to embedding screenshots in the HTML reports generated 
by Cucumber.

If you are using some other framework than Cucumber, it likely provides an 
'after' functionality to run code after each test, and some way to 
determine if the test failed or passed, so you could utilize that and 
modified versions of the code for doing this with cucumber to capture 
screenshots in your framework.

If you are not using a framework, or trying to create your own, I'd 
strongly advise looking at some of the existing frameworks, re-using one of 
them might save you a lot of time, and make it a lot easier to manage your 
tests. 

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to