always output the HTML anyway

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@919326 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2010-03-05 07:59:47 +00:00
parent e521a959c5
commit 62b97751fb
1 changed files with 15 additions and 15 deletions

View File

@ -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() );
}
}