I'm sorry to keep at this, but I still can't get the SelniumContext populated. 3 days trying now. Maybe I'm thinking this does what it doesn't do. Does JBehave/Selenium actually populate the seleniumContext with the scenario or story name, or do I have to? And if so, how do I get the scenario name, because if I can do that, I don't need the seleniumContext.
Is there any documentation on this, or just the examples in webtraderexamples? thanks for your patience. vicki "Mauro Talevi" <[email protected]> wrote in message news:[email protected]... > Hi Vicki, > > you can override the default configuration in the injectedEmbedder() via > the useConfiguration(SeleniumConfiguration) method. > > Cheers > > On 26/05/2011 16:11, VSS wrote: >> Hi Mauro. >> A portion of our framework code is below. I tried to create a >> SeleniumConfiguration and then call >> injectedEmbedder.useConfiguration(seleniumConfig). However, when >> injectedEmbedder().runStoriesAsPaths(storyPaths()) is called, instead of >> using seleniumConfig, it still uses the MostUsefulConfiguration. The >> title >> in the SeleniumContext is never set even on failure. >> >> Thanks. >> Vicki >> >> @RunWith(SpringAnnotatedEmbedderRunner.class) >> @Configure(pendingStepStrategy = FailingUponPendingStep.class) >> @UsingEmbedder(embedder = Embedder.class, generateViewAfterStories = >> true, >> ignoreFailureInStories = true, ignoreFailureInView = false, >> storyTimeoutInSecs = 100, threads = 1, metaFilters = >> "-skip") >> @UsingSpring(resources = {"datasources.xml", "properties.xml", >> "jbehave-spring-configuration.xml"}) >> >> public abstract class AbstractSpringConfiguredTestSuite extends >> InjectableEmbedder { >> @Test >> public void run() throws Throwable { >> injectedEmbedder().configuration() >> .useStoryReporterBuilder(new StoryReporterBuilder() >> .withRelativeDirectory("jbehave-reports") >> .withFormats(HTML, CONSOLE, STATS ) >> >> .withCodeLocation(CodeLocations.codeLocationFromPath("build/test")) >> .withFailureTrace(true)); >> injectedEmbedder().runStoriesAsPaths(storyPaths()); >> } >> >> protected abstract List<String> storyPaths(); >> } >> >> >> >> >> >> "Mauro Talevi" <[email protected]> >> wrote >> in message news:[email protected]... >>> Hi Vicki, >>> >>> can you please be more precise about what you think you can't do? >>> >>> MostUsefulConfiguration is simply a concretisation of Configuration, >>> providing some defaults. SeleniumConfiguration extends Configuration >>> with Selenium-specific elements. What you can do with >>> MostUsefulConfiguration you'll be able to do with SeleniumConfiguration. >>> >>> Cheers >>> >>> On 26/05/2011 00:34, VSS wrote: >>>> I am trying to use the new code introduced in JBehave-413 to name our >>>> screenshot files more meaningfully. >>>> I did try following the example laid out in Paul's tutorial site >>>> https://github.com/paul-hammant/jbehave-webdriver-example/blob/master/etsy-stories/src/main/java/org/jbehave/tutorials/etsy/EtsyDotComStories.java#L42 >>>> >>>> However, our framework is extending InjectableEmbedder and uses >>>> runStoriesAsPaths(storyPaths()). In following the code around, I see >>>> that >>>> the Embedder class uses MostUsefulConfiguration, and there doesn't seem >>>> to >>>> be a way to make that a SeleniumConfiguration, which, as I see it, is >>>> the >>>> configuration I need to get the scenario name. >>>> >>>> Following Paul's example would require me to completely rewrite the >>>> framework, I think. Any suggestions? >>>> >>>> (PS...Hi Paul, this is Vicki from Hoover's. The framework is Kozak's, >>>> so >>>> you've seen it, albeit many months ago) . >>>> >>>> Thanks In Advance. >>>> Vicki >>>> >>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
