Skip to content

Commit

Permalink
Default screenshot location to a relative path that should put them i…
Browse files Browse the repository at this point in the history
…n the target/screenshots directory.
  • Loading branch information
Ardesco committed Oct 14, 2015
1 parent 0b49d68 commit 104a703
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private void writeScreenshotToFile(WebDriver driver, File screenshot) {
public void onTestFailure(ITestResult failingTest) {
try {
WebDriver driver = getDriver();
String screenshotDirectory = System.getProperty("screenshotDirectory");
String screenshotDirectory = System.getProperty("screenshotDirectory", "target/screenshots");
String screenshotAbsolutePath = screenshotDirectory + File.separator + System.currentTimeMillis() + "_" + failingTest.getName() + ".png";
File screenshot = new File(screenshotAbsolutePath);
if (createFile(screenshot)) {
Expand Down

0 comments on commit 104a703

Please sign in to comment.