Author: ozizka(a)redhat.com
Date: 2009-02-02 23:27:07 -0500 (Mon, 02 Feb 2009)
New Revision: 129
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
Log:
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-02-03
00:21:21 UTC (rev 128)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2009-02-03
04:27:07 UTC (rev 129)
@@ -23,8 +23,6 @@
package org.jboss.jopr.jsfunit;
import com.gargoylesoftware.htmlunit.BrowserVersion;
-import com.gargoylesoftware.htmlunit.ElementNotFoundException;
-import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.*;
import java.io.IOException;
import java.util.*;
@@ -35,8 +33,6 @@
import org.jboss.jsfunit.jsfsession.JSFServerSession;
import org.jboss.jsfunit.jsfsession.JSFSession;
import javax.faces.application.FacesMessage;
-import javax.management.*;
-import org.jboss.mx.util.MBeanServerLocator;
//import org.jboss.jmx.adaptor.rmi.RMIAdaptor; // Needs dependency: jmx-adaptor-plugin
import java.util.regex.Pattern;
import javax.xml.xpath.XPathException;
@@ -70,9 +66,11 @@
*/
public void setUp() throws IOException
{
- isJBoss4 = Package.getPackage("org.jboss.system.server")
- .getImplementationVersion()
- .startsWith("4");
+ // JBoss as version
+ String version = Package.getPackage("org.jboss.system.server")
+ .getImplementationVersion();
+ log.info("Detected AS version: " + version);
+ isJBoss4 = version.startsWith("4");
// Initial JSF request
WebClientSpec wcSpec = new WebClientSpec("/",
BrowserVersion.FIREFOX_3);
@@ -215,13 +213,13 @@
* If the input box/radio button does not have an enable/disable checkbox,
* return the input element as is.
*/
- public HtmlInput enableOrDisableFormInput(String propertyName,
- Boolean enableInput) {
+ public HtmlInput enableOrDisableFormInput(String propertyName, Boolean enableInput)
{
+
HtmlForm form =
(HtmlForm)client.getElement("resourceConfigurationForm");
HtmlInput input =
(HtmlInput)form.getFirstByXPath(".//input[@ondblclick='//"
+ propertyName + "']");
- assertNotNull("Form input for property " + propertyName + " not
found.", input);
+ assertNotNull("Form input for property '" + propertyName +
"' not found.", input);
boolean isRadioButton = input.getTypeAttribute().equals("radio");
String id = input.getId();
Show replies by date