[embjopr-commits] EMBJOPR SVN: r334 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util.
embjopr-commits at lists.jboss.org
embjopr-commits at lists.jboss.org
Fri Apr 24 14:39:53 EDT 2009
Author: ozizka at redhat.com
Date: 2009-04-24 14:39:53 -0400 (Fri, 24 Apr 2009)
New Revision: 334
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
Log:
EJTT: currentTest added on several places to trigger page dump upon HtmlElementNotFoundException
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2009-04-24 17:54:27 UTC (rev 333)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2009-04-24 18:39:53 UTC (rev 334)
@@ -682,7 +682,7 @@
Element elem = client.getElement(elemID);
if( null == elem ){
throw new HtmlElementNotFoundException(
- "Can't find the ops history table element, searched ID: " + elemID);
+ "Can't find the ops history table element, searched ID: " + elemID, currentTest);
}
return new OperationsHistoryTable( (HtmlTable)elem );
@@ -705,7 +705,7 @@
HtmlButtonInput button = this.element.getFirstByXPath(".//input[normalize-space(@value)='"+label+"']");
if( null == button )
- throw new HtmlElementNotFoundException("Button labelled '"+label+"' not found.");
+ throw new HtmlElementNotFoundException("Button labelled '"+label+"' not found.", currentTest);
return button;
@@ -744,7 +744,7 @@
HtmlTable tableElm = (HtmlTable) client.getElement("resourceSummaryForm:dataTable");
if( null == tableElm ){
throw new HtmlElementNotFoundException(
- "Data table not found (looking for ID 'resourceSummaryForm:dataTable'");
+ "Data table not found (looking for ID 'resourceSummaryForm:dataTable'", currentTest);
}
ContentTable table = new ContentTable(tableElm);
@@ -849,7 +849,7 @@
throws HtmlElementNotFoundException
{
if( 0 == element.getRowCount() )
- throw new HtmlElementNotFoundException("Table has no rows.");
+ throw new HtmlElementNotFoundException("Table has no rows.", currentTest);
// TODO: Escape the single quotes. By doubling?
// http://books.google.com/books?id=jzqFMlM0gb0C&pg=PA308&lpg=PA308&dq=xquery+escape+quote&source=bl&ots=DIKQ92AhHh&sig=A7adGlif6jfYKtJXGc4eZbXYeCQ&hl=cs&ei=LYCcSYKLO5ir-gazwfjtBA&sa=X&oi=book_result&resnum=8&ct=result
@@ -921,7 +921,7 @@
HtmlTableRow elm = (HtmlTableRow) element.getFirstByXPath(xPath);
if( null == elm )
throw new HtmlElementNotFoundException(
- "Can't find row containing link '"+linkLabel+"' using XPath: "+xPath);
+ "Can't find row containing link '"+linkLabel+"' using XPath: "+xPath, currentTest);
return new ContentTableRow(elm, this);
}
@@ -942,7 +942,7 @@
if( 0 == colHeaders.size() ){
//this.analyzedButNotFound = true;
- throw new HtmlElementNotFoundException("Table has no column headers.");
+ throw new HtmlElementNotFoundException("Table has no column headers.", currentTest);
}
List<String> colLabels_ = new ArrayList(colHeaders.size());
@@ -977,7 +977,7 @@
Integer index = this.colIndexes.get(colName);
if( null == index )
- throw new HtmlElementNotFoundException("No column named '"+colName+"'.");
+ throw new HtmlElementNotFoundException("No column named '"+colName+"'.", currentTest);
return index;
}
@@ -1096,7 +1096,7 @@
HtmlTableRow tr = this.element.getFirstByXPath(xPath);
if( null == tr ){
throw new HtmlElementNotFoundException(
- "Operation status row not recognized; used XPath: "+xPath);
+ "Operation status row not recognized; used XPath: "+xPath, currentTest);
}
return tr;
}
@@ -1106,7 +1106,7 @@
OperationStatusType status = OperationStatusType.fromStatusText( tr.getTextContent() );
if( null == status )
throw new HtmlElementNotFoundException(
- "Operation status not recognized. Row text: "+tr.getTextContent());
+ "Operation status not recognized. Row text: "+tr.getTextContent(), currentTest);
return status;
}
More information about the embjopr-commits
mailing list