I just ran a very small program using fighting-layout-bugs-0.6 jar. PFB my code
public static void main(String[] args)
{
WebDriver driver = new FirefoxDriver();
WebPage webPage = new WebPageBackedByWebDriver(driver);
FightingLayoutBugs flb = new FightingLayoutBugs();
final Collection<LayoutBug> layoutBugs = flb.findLayoutBugsIn(webPage);
System.out.println("Found " + layoutBugs.size() + " layout bug(s).");
for (LayoutBug bug : layoutBugs) {
System.out.println(bug);
}
}
PFB the error
Exception in thread "main" java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebElement cannot be cast to org.openqa.selenium.RenderedWebElement
at com.googlecode.fightinglayoutbugs.DetectInvalidImageUrls.checkVisibleImgElements(DetectInvalidImageUrls.java:155)
at com.googlecode.fightinglayoutbugs.DetectInvalidImageUrls.findLayoutBugsIn(DetectInvalidImageUrls.java:108)
at com.googlecode.fightinglayoutbugs.FightingLayoutBugs.findLayoutBugsIn(FightingLayoutBugs.java:151)
at se.visualTesting.main(visualTesting.java:24)
Please correct me if I doing something wrong.