我正在使用jbehave使用selenium。每当故事发生故障时,故事就会被挂起,即使步骤失败,浏览器也不会关闭。
请找到我的配置:
return new SeleniumConfiguration()
.useWebDriverProvider(driverProvider)
.useSeleniumContext(seleniumContext).useFailureStrategy(new FailingUponPendingStep())
.useStoryControls(new StoryControls().doResetStateBeforeScenario(false).doIgnoreMetaFiltersIfGivenStory(true))
//.useStepMonitor(new SeleniumStepMonitor(contextView, seleniumContext, xref.getStepMonitor())) //?
.useStoryLoader(new LoadFromClasspath(this.getClass().getClassLoader()))
.useStoryReporterBuilder(new MyStoryReporterBuilder(config, storyData, props, dbConnection)
.withCodeLocation(CodeLocations.codeLocationFromPath(getClassPath()))
.withDefaultFormats()
.withCrossReference(xref)
.withFormats(Format.CONSOLE, Format.HTML, Format.XML))
;
}