ContentTable table;
ContentInfoTable infoTable;
String headerText;
Properties properties;
JMXUtils jmxUtils = JMXUtils.getInstanceForLocalJBoss();
/*
* General Properties
Name:JBoss AS 5 (default)
Version:5.1.0.CR1
Description:JBoss Application Server
*/
headerText = "General Properties";
assertTrue("Page doesn't contain the header: "+headerText, pageText.contains(headerText));
table = ejtt.getTabMenu().getTabContentBox().getTableUnderHeader(headerText);
infoTable = ejtt.getContentInfoTable(table.getElement());
properties = infoTable.getProperties();
assertEquals("General Properties / Name", pageHeaderText, properties.getProperty("Name") );
String versionPrefix = "5.1";
String jmxMBeanName = "jboss.system:type=Server";
versionPrefix = (String) jmxUtils.getMBeanAttribute(jmxMBeanName, "VersionNumber");
assertTrue("General Properties / Version startsWith('"+versionPrefix+"')",
properties.getProperty("Version","~not found~").startsWith(versionPrefix) );
assertEquals("General Properties / Description", AS_NODE_DESCRIPTION, properties.get("Description") );