--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
After creating your RemoteWebdriver instances, add;
driver = new Augmenter().augment(driver);
then when you want to take a screenshot;
final File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("ScreenShotOnFailure.png"));
Robbie,
Mike
--
http://darrellgrainger.blogspot.com/2011/02/generating-screen-capture-on-exception.html
On Aug 30 2011, 12:05 am, Krishnan Mahadevan
<krishnan.mahadevan1...@gmail.com> wrote:
> Robbie,
> There's a method void onException(Throwable throwable, WebDriver driver);
> that resides within the interface WebDriverEventListener.
> Perhaps you could have a class that implements this interface and then hook
> it onto an EventFiringWebDriver and try.
>
> Just a suggestion, because I havent personally given it a try to be able to
> give you a concrete answer.
>
> Thanks & Regards
> Krishnan Mahadevan
>
> "All the desirable things in life are either illegal, expensive, fattening
> or in love with someone else!"
>
>
>
> On Tue, Aug 30, 2011 at 1:26 PM, <robbie.ware...@nokia.com> wrote:
> > Hi,
>
> > I have screenshot capturing working with RemoteWebdriver, and combined with
> > TestNG, I can capture the screenshot as part of the MethodTeardown.
> > However, I’m sure I should be able to let Selenium take care of that for me
> > and capture screenshots on error.
>
> > Is this true, or is using the teardown the best way of doing it? If not,
> > any hints as to how to set the RemoteWebdriver object to capture screenshot
> > on selenium failure?
>
> > Thanks
> > *Robbie Wareham
> > *
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Selenium Users" group.
> > To post to this group, send email to seleniu...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > selenium-user...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/selenium-users?hl=en.- Hide quoted text -
>
> - Show quoted text -