TableCellOffsetTest.java 881 Bytes
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));
        }
    }

}