Skipping DetectNeedsHorizontalScrolling

46 views
Skip to first unread message

sunny sachdeva

unread,
Jan 21, 2015, 6:21:24 AM1/21/15
to fighting-l...@googlegroups.com
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();
driver.get("http://www.amazon.com");
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
Skipping DetectNeedsHorizontalScrolling -- Failed to resize browser window. If you are using Chrome, see http://code.google.com/p/chromium/issues/detail?id=2091
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.

Michael Tamm

unread,
Jan 21, 2015, 8:34:56 AM1/21/15
to fighting-l...@googlegroups.com
Hi,

there seems to be an old version of the DetectInvalidImageUrls class to be in your classpath,
because the cast to RenderedWebElement was removed in the commit 36e93a18112c.

Please make sure, you are using fighting-layout-bugs-0.6.jar from the central maven repo
and you don't have any old FLB jars in your classpath.

Kind regards, Michael
Reply all
Reply to author
Forward
0 new messages