commit 37bd2972486720c0a8545287b349bb8c750d65ed
Author:     Paul Hammant <p...@hammant.org>
AuthorDate: Wed Mar 28 06:41:25 2012 -0500
Commit:     Paul Hammant <p...@hammant.org>
CommitDate: Wed Mar 28 06:41:25 2012 -0500

    JBEHAVE-752 - file separators fixed

diff --git 
a/web-selenium/src/main/java/org/jbehave/web/selenium/SeleniumScreenshotOnFailure.java
 
b/web-selenium/src/main/java/org/jbehave/web/selenium/SeleniumScreenshotOnFailure.java
index 67994b1..4657903 100644
--- 
a/web-selenium/src/main/java/org/jbehave/web/selenium/SeleniumScreenshotOnFailure.java
+++ 
b/web-selenium/src/main/java/org/jbehave/web/selenium/SeleniumScreenshotOnFailure.java
@@ -1,9 +1,10 @@
 package org.jbehave.web.selenium;
 
+import com.thoughtworks.selenium.Selenium;
 import org.jbehave.core.annotations.AfterScenario;
 import org.jbehave.core.annotations.AfterScenario.Outcome;
 
-import com.thoughtworks.selenium.Selenium;
+import java.io.File;
 
 /**
  * SeleniumSteps that capture screenshot upon failure in a scenario outcome.
@@ -16,7 +17,7 @@ public class SeleniumScreenshotOnFailure extends 
SeleniumSteps {
 
     @AfterScenario(uponOutcome = Outcome.FAILURE)
     public void afterFailingScenario() throws Exception {
-        String screenshotPath = "target/screenshots/failed-scenario-" + 
System.currentTimeMillis() + ".png";
+        String screenshotPath = "target" + File.separator + "screenshots" + 
File.separator + "failed-scenario-" + System.currentTimeMillis() + ".png";
         selenium.captureScreenshot(screenshotPath);
     }
     



Reply via email to