continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r918250 - /continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
Date Tue, 02 Mar 2010 23:14:12 GMT
Author: brett
Date: Tue Mar  2 23:14:12 2010
New Revision: 918250

URL: http://svn.apache.org/viewvc?rev=918250&view=rev
Log:
show stack trace in screenshot if there is one causing the test to fail

Modified:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java?rev=918250&r1=918249&r2=918250&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
Tue Mar  2 23:14:12 2010
@@ -58,6 +58,13 @@
 
     private void captureError( ITestResult tr )
     {
+        Selenium selenium = AbstractSeleniumTest.getSelenium();
+        String locator = "link=Show/hide Stack Trace";
+        if ( selenium.isElementPresent( locator ) )
+        {
+            selenium.click( locator );
+        }
+
         SimpleDateFormat sdf = new SimpleDateFormat( "yyyy.MM.dd-HH_mm_ss" );
         String time = sdf.format( new Date() );
         File targetPath = new File( "target", "screenshots" );
@@ -69,7 +76,6 @@
         String lineNumber = Integer.toString( lNumber );
         String className = cName.substring( cName.lastIndexOf( '.' ) + 1 );
         targetPath.mkdirs();
-        Selenium selenium = AbstractSeleniumTest.getSelenium();
         String fileBaseName = methodName + "_" + className + ".java_" + lineNumber + "-"
+ time;
         try
         {



Mime
View raw message