From 62b97751fb8417a0d0f07cdc84fb51abd473470f Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Fri, 5 Mar 2010 07:59:47 +0000 Subject: [PATCH] always output the HTML anyway git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@919326 13f79535-47bb-0310-9956-ffa450edef68 --- .../listener/CaptureScreenShotsListener.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java index 8ee826394..36bba0933 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java @@ -19,18 +19,18 @@ package org.apache.archiva.web.test.listener; * under the License. */ +import com.thoughtworks.selenium.Selenium; +import org.apache.archiva.web.test.parent.AbstractSeleniumTest; +import org.apache.commons.io.FileUtils; +import org.testng.ITestResult; +import org.testng.TestListenerAdapter; + import java.io.File; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.regex.Pattern; -import org.apache.archiva.web.test.parent.AbstractSeleniumTest; -import org.apache.commons.io.FileUtils; -import org.testng.ITestResult; -import org.testng.TestListenerAdapter; -import com.thoughtworks.selenium.Selenium; - public class CaptureScreenShotsListener extends TestListenerAdapter { @@ -80,15 +80,15 @@ public class CaptureScreenShotsListener catch ( RuntimeException e ) { System.out.println( "Error when take screenshot for test " + tr.getName() + ": " + e.getMessage() ); - try - { - File fileName = new File( targetPath, fileBaseName + ".html" ); - FileUtils.writeStringToFile( fileName, selenium.getHtmlSource() ); - } - catch ( IOException ioe ) - { - System.out.println( ioe.getMessage() ); - } + } + try + { + File fileName = new File( targetPath, fileBaseName + ".html" ); + FileUtils.writeStringToFile( fileName, selenium.getHtmlSource() ); + } + catch ( IOException ioe ) + { + System.out.println( ioe.getMessage() ); } }