[embjopr-commits] EMBJOPR SVN: r223 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util.

embjopr-commits at lists.jboss.org embjopr-commits at lists.jboss.org
Fri Mar 13 17:10:26 EDT 2009


Author: ozizka at redhat.com
Date: 2009-03-13 17:10:26 -0400 (Fri, 13 Mar 2009)
New Revision: 223

Modified:
   trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
Log:
Added getClickableByID() to EmbJoprtestToolkit

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-03-13 20:56:22 UTC (rev 222)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java	2009-03-13 21:10:26 UTC (rev 223)
@@ -1045,7 +1045,17 @@
 		return button;
 	}
 
+	/**
+	 *  Finds element by ID and returns retyped as HTML button.
+	 */
+	public ClickableElement getClickableByID( String id ) throws HtmlElementNotFoundException {
+		ClickableElement clickable = (ClickableElement) client.getElement( id );
+		if( null == clickable )
+			throw new HtmlElementNotFoundException("Can't find element with ID: "+clickable);
+		return clickable;
+	}
 
+
 	/** Converts java.util.Properties to java.util.Map. */
 	public static Map<String,String> propertiesAsMap( Properties props )
 	{
@@ -1062,6 +1072,10 @@
 		return map;
 	}
 
+	/**
+	 * Converts properties to Set of Strings.
+	 * Substitutes JDK 1.6's Properties::stringPropertyNames().
+	 */
 	public static Set<String> stringPropertyNames( Properties props )
 	{
 		Set<String> propNames = new HashSet<String>();




More information about the embjopr-commits mailing list