Details
-
Type: Bug
-
Status: In Progress
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: web-3.x
-
Component/s: Web Selenium
-
Labels:None
-
Environment:Apache Maven 3.0.4
Java version: 1.6.0_26
-
Number of attachments :
Description
When I use as life cycle steps PerScenarioWebDriverSteps and try to execute scenario which has GivenStories section then occurs DelegateWebDriverNotFound.
What happens during executions:
1. Firefox blank window is opened (for top level scenario?)
2. Another firefox windows is opened and executes scenario from GivenStories section then this window is closed.
3. Exceptions occurs.
How to reproduce:
1. Checkout examples etsy-selenium/java-spring
2. Updated etsy-selenium/java-spring/src/main/resources/etsy-steps.xml with file provided in attachment.
3. Add stories provided in attachment.
4. Run stories with:
mvn clean install -Dmeta.filter="+givenstories"
Expected:
Each scenario successfully executed in new firefox window.
Actual:
Failing top-level scenario.
Console output:
Given I am on etsy.com (FAILED)
(org.jbehave.web.selenium.DelegatingWebDriverProvider$DelegateWebDriverNotFound: WebDriver has not been found for this thread.
Please verify you are using the correct WebDriverProvider, with the appropriate credentials if using remote access, e.g. to SauceLabs: -DSAUCE_USERNAME=xxxxxx -DSAUCE_ACCESS_KEY=xxx-xxxx-xxxx-xxxx-xxx )
When I want to browse through a treasury gallery (NOT PERFORMED)
When I want to buy something from etsy.com (NOT PERFORMED)
When I want to browse the treasury (NOT PERFORMED)
When I choose the first treasury gallery (NOT PERFORMED)
!-- We don't care for the results, just the gallery
Then results will be displayed in the gallery (NOT PERFORMED)
org.jbehave.web.selenium.PerScenarioWebDriverSteps.afterScenario() (FAILED)
(org.jbehave.core.failures.BeforeOrAfterFailed: Method afterScenario (annotated with @AfterScenario in class org.jbehave.web.selenium.PerScenarioWebDriverSteps) failed: java.lang.NullPointerException)
org.jbehave.core.failures.BeforeOrAfterFailed: Method afterScenario (annotated with @AfterScenario in class org.jbehave.web.selenium.PerScenarioWebDriverSteps) failed: java.lang.NullPointerException
at org.jbehave.core.steps.StepCreator$BeforeOrAfterStep.perform(StepCreator.java:447)
at org.jbehave.core.steps.StepCreator$BeforeOrAfterStep.doNotPerform(StepCreator.java:460)
at org.jbehave.core.embedder.StoryRunner$SomethingHappened.run(StoryRunner.java:509)
[WARNING] Failed to run story etsy_browse_with_givenStories.story
org.jbehave.web.selenium.DelegatingWebDriverProvider$DelegateWebDriverNotFound: WebDriver has not been found for this thread.
Please verify you are using the correct WebDriverProvider, with the appropriate credentials if using remote access, e.g. to SauceLabs: -DSAUCE_USERNAME=xxxxxx -DSAUCE_ACCESS_KEY=xxx-xxxx-xxxx-xxxx-xxx
at org.jbehave.web.selenium.DelegatingWebDriverProvider.get(DelegatingWebDriverProvider.java:24)
at org.jbehave.web.selenium.WebDriverPage.get(WebDriverPage.java:36)
at org.jbehave.tutorials.etsy.pages.Home.go(Home.java:18)
at org.jbehave.tutorials.etsy.steps.EtsyDotComSteps.homepageOnEtsyDotCom(EtsyDotComSteps.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jbehave.core.steps.StepCreator$ParameterisedStep.perform(StepCreator.java:537)
at org.jbehave.core.embedder.StoryRunner$FineSoFar.run(StoryRunner.java:474)
at org.jbehave.core.embedder.StoryRunner.runStepsWhileKeepingState(StoryRunner.java:454)
at org.jbehave.core.embedder.StoryRunner.runScenarioSteps(StoryRunner.java:418)
at org.jbehave.core.embedder.StoryRunner.runCancellable(StoryRunner.java:293)
at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:211)
at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:172)
at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:229)
at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:201)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:56)
at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:41)
at org.jbehave.core.embedder.StoryManager.submit(StoryManager.java:198)
at org.jbehave.core.embedder.StoryManager.runningStory(StoryManager.java:132)
at org.jbehave.core.embedder.StoryManager.filterRunning(StoryManager.java:116)
at org.jbehave.core.embedder.StoryManager.runningStoriesAsPaths(StoryManager.java:101)
at org.jbehave.core.embedder.StoryManager.runStories(StoryManager.java:78)
at org.jbehave.core.embedder.Embedder.runStoriesAsPaths(Embedder.java:202)
at org.jbehave.core.junit.JUnitStories.run(JUnitStories.java:20)
at org.jbehave.core.embedder.Embedder.runAsEmbeddables(Embedder.java:122)
at org.jbehave.mojo.RunStoriesAsEmbeddables.execute(RunStoriesAsEmbeddables.java:18)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds
Additional info:
Double execution of scenario included in GivenStories is connected to JBEHAVE-789
Activity
Field | Original Value | New Value |
---|---|---|
Assignee | Mauro Talevi [ maurotalevi ] | |
Fix Version/s | web-3.6 [ 18388 ] | |
Affects Version/s | 3.6.7 [ 18494 ] | |
Component/s | Web Selenium [ 14124 ] | |
Component/s | Core [ 11086 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Fix Version/s | web-3.x [ 17273 ] | |
Fix Version/s | web-3.6 [ 18388 ] |
Let's try to decouple the two issues:
Would it be possible for you to clone the jbehave-tutorial in github and provide your modifications in different branches?
In this way, it's much easier to see what changing wrt to a working scenario.
Thanks