StringBuilder sb = new StringBuilder()
.append("Test failed but no test result details found.\n")
.append(se.getMessage())
.append("\n")
.append(sSelenium.getBodyText());
throw new SeleniumException(sb.toString());
}
}
else
{
// PPR content with no TCK span ids.
if ((sSelenium.isElementPresent("//p[contains (.,\"FAILED\")]")))
{
// Portlet shows a failure result so display details
try
{
details = sSelenium.getText("//p[contains(.,\"Detail\")]//p[1]");
}
catch (SeleniumException se)
{
// Portlet contains no detail section, should never happen.
StringBuilder sb = new StringBuilder()
.append("Test failed but no test result details found.\n")
.append(se.getMessage())
.append("\n")
.append(sSelenium.getBodyText());
throw new SeleniumException(sb.toString());
}
}
else if (sSelenium.isElementPresent("//p[contains (.,\"SUCCESS\")]"))
{
testStatus = "SUCCESS";