Hi all

I'm running JBehave driven selenium tests of our system.
When we get failures the reports include links to a screenshot of the failure.
My problem is that the actual screenshot doesn't get generated.
I have config like:
@RunWith(SpringAnnotatedEmbedderRunner.class)
@Configure(using = SeleniumConfiguration.class, pendingStepStrategy = 
FailingUponPendingStep.class)
@UsingEmbedder(embedder = Embedder.class, generateViewAfterStories = true, 
ignoreFailureInStories = true, ignoreFailureInView = false, storyTimeoutInSecs 
= 600, threads = 1, metaFilters = "-skip")
@UsingSpring(resources = { "steps.xml" })
public class MyStories extends InjectableEmbedder {

And my html report says:
org.openqa.selenium.TimeoutException: Timed out after 20 seconds waiting for 
element to be clickable: By.linkText: Frtsätt Build info: version: '2.30.0', 
revision: 'dc1ef9ceb805a672f56dc49198f9ffbd4ca345c7', time: '2013-02-19 
09:14:38' System info: os.name: 'Windows NT (unknown)', os.arch: 'amd64', 
os.version: '6.2', java.version: '1.6.0_23' Driver info: driver.version: unknown
<broken link to failing screenshot>

The ReporterBuilder:
        Format[] formats =
            new Format[] { new SeleniumContextOutput(seleniumContext), CONSOLE,
                    TXT, WEB_DRIVER_HTML, XML };
        StoryReporterBuilder reporterBuilder =
            new StoryReporterBuilder()
                .withCodeLocation(codeLocationFromClass(this.getClass()))
                .withFailureTraceCompression(true)
                .withRelativeDirectory("jbehave-reports").withDefaultFormats()
                .withFormats(formats).withKeywords(keywords)
                .withCrossReference(crossReference).withFailureTrace(true);

Can anyone spot why I don't get the screenshots?

I've read a lot about overriding the stepsFactory but I can't seem to figure 
out if I need that since I don't use JUnitStories.
Is it that I should call
injectedEmbedder().useStepsFactory(some instance)?

TIA,
Christian

Christian Karlsson
CAG Contactor AB
Adress: Jan Stenbecks Torg 17, SE-164 40 Kista
Mobil: +46 (0)706694527
Mail: christian.karlsson <at> cag.se
www.cag.se<https://wmail.cag.se/owa/redir.aspx?C=G2EjVQkj7kGZyieqy24uGB6NV2uAkM9Iy3xqV4cZFUaEVGXCGlWIq_V5O25t1jIUtjHgAaGFl0U.&URL=http%3a%2f%2fwww.cag.se%2f>

Reply via email to