Adding custom screenshots

256 views
Skip to first unread message

Vitali Kasyanenka

unread,
Apr 15, 2014, 5:37:22 AM4/15/14
to thucydid...@googlegroups.com
Hi everyone,

Trying to integrate thucydides with adobe genie(flash automation tool). Everything works as expected, except of taking the screenshots: webdriver cannot take a screenshot of the flash content.
So, I've decided to take this screenshot externally and then add it to the test step.
I've created the custom step listener but can not find a place where I can get and update the current step
I'm overriding the stepFailed method, taking the screenshot and storing it to the ScreenshotAndHtmlSource, but what's now?
I also tried to get current test outcome, but it's always empty. If I try to set it in the testStarted, the default BaseStepListener stops working,

Any ideas? :)

Vitali Kasyanenka

unread,
Apr 15, 2014, 6:05:00 AM4/15/14
to thucydid...@googlegroups.com
ok, I've found it myself :)
it's possible to change the test outcome in: 
void testFinished(final TestOutcome result);

Matthew Chan

unread,
Mar 30, 2016, 7:28:36 PM3/30/16
to Serenity BDD Users Group
Hi Vitali,

I am currently trying to achieve the same thing whereby I use serenity for reports when automating the testing of an app within a Java Jframe.

I can currently take screenshots of the JFrame, however there is no way for me to attach these to Serenity reports properly without doing a hack where I embed it as an HTML img src to a dummy @Step (Issue with this is that I need to manually call the method after every serenity step library method and it isn't automatically called after every step or test scenario failure). 

Regards,
Matt 
Reply all
Reply to author
Forward
0 new messages