diff --git a/src/test/java/pl/labno/bernard/htmlunified/TableCellOffsetTest.java b/src/test/java/pl/labno/bernard/htmlunified/TableCellOffsetTest.java new file mode 100644 index 0000000..ab1464f --- /dev/null +++ b/src/test/java/pl/labno/bernard/htmlunified/TableCellOffsetTest.java @@ -0,0 +1,24 @@ +package pl.labno.bernard.htmlunified; + +import com.gargoylesoftware.htmlunit.BrowserVersion; +import com.gargoylesoftware.htmlunit.CollectingAlertHandler; +import com.gargoylesoftware.htmlunit.WebClient; +import org.junit.Assert; +import org.junit.Test; + +import java.io.IOException; + +public class TableCellOffsetTest { + + @Test + public void testClickImage() throws IOException { + final WebClient client = new WebClient(BrowserVersion.FIREFOX_3_6); + CollectingAlertHandler collectingAlertHandler = new CollectingAlertHandler(); + client.setAlertHandler(collectingAlertHandler); + client.getPage("file:./target/test-classes/tableCellOffset.html"); + for (String message : collectingAlertHandler.getCollectedAlerts()) { + Assert.assertTrue("Comparison of rows offset().left returned false", Boolean.parseBoolean(message)); + } + } + +}