use of com.gargoylesoftware.htmlunit.html.HtmlTableCell in project selenium_java by sergueik.
the class WhenBrowsingReportsList method checkReportTitle.
private void checkReportTitle(final HtmlTableRow row) {
final HtmlTableCell cell = row.getCell(1);
final String text = cell.getTextContent();
Assert.assertFalse("Unexpected blank text in report title", text.isEmpty());
}
use of com.gargoylesoftware.htmlunit.html.HtmlTableCell in project JSCover by tntim96.
the class HtmlUnitServerBranchAndFunctionTest method verifySource.
private void verifySource(HtmlTable sourceTable, int row, int coverageCount, String source, String alertLine, String cssClass) throws IOException {
assertThat(sourceTable.getRow(row).getCell(1).asText(), equalTo("" + coverageCount));
assertThat(sourceTable.getRow(row).getCell(3).asText(), equalTo(source));
HtmlTableCell branchCell = sourceTable.getRow(row).getCell(2);
if (alertLine == null) {
assertThat(branchCell.asText(), equalTo(" "));
assertThat(branchCell.getAttribute("class"), equalTo("numeric " + cssClass));
} else {
assertThat(branchCell.asText(), equalTo("info"));
HtmlAnchor anchor = (HtmlAnchor) branchCell.getFirstChild().getFirstChild();
final String[] alert = new String[1];
webClient.setAlertHandler((page, message) -> alert[0] = message);
anchor.click();
assertThat(alert[0], containsString(alertLine));
}
}
use of com.gargoylesoftware.htmlunit.html.HtmlTableCell in project selenium_java by sergueik.
the class WhenBrowsingReportsList method checkReportIcon.
private void checkReportIcon(final HtmlTableRow row) {
final HtmlTableCell cell = row.getCell(0);
final List<HtmlElement> elements = cell.getHtmlElementsByTagName("img");
Assert.assertEquals("Unexpected number of image elements", 1, elements.size());
final HtmlImage img = (HtmlImage) elements.get(0);
final String iconPath = img.getSrcAttribute().toUpperCase();
Assert.assertTrue("Unexpected report icon: ", iconPath.endsWith("/DOCUMENT.GIF"));
}
use of com.gargoylesoftware.htmlunit.html.HtmlTableCell in project selenium_java by sergueik.
the class WhenBrowsingReportsList method checkReportDescription.
private void checkReportDescription(final HtmlTableRow row) {
final HtmlTableCell cell = row.getCell(2);
final String text = cell.getTextContent();
Assert.assertFalse("Unexpected blank text in report description", text.isEmpty());
}
use of com.gargoylesoftware.htmlunit.html.HtmlTableCell in project selenium_java by sergueik.
the class WhenBrowsingReportsList method checkReportInfo.
private void checkReportInfo(final HtmlTableRow row) {
final HtmlTableCell cell = row.getCell(3);
final String text = cell.getTextContent();
Assert.assertFalse("Unexpected blank text in report info", text.isEmpty());
}
Aggregations