Hi All,
I'm getting an error while trying to validate a page via RemoteWebDriver. It's indicating that RemoteWebDriver does not support taking screenshots which I don't think is the case since I screenshot with it all the time in other contexts:
public static File screenshot() {
WebDriver
augmentedDriver = new Augmenter().augment(remoteWebDriver));
return
((TakesScreenshot) augmentedDriver).getScreenshotAs(OutputType.FILE);
}
Exception:
java.lang.UnsupportedOperationException: org.openqa.selenium.remote.RemoteWebDriver does not support taking screenshots.
at com.googlecode.fightinglayoutbugs.ScreenshotCache.takeScreenshot(ScreenshotCache.java:251)
at com.googlecode.fightinglayoutbugs.ScreenshotCache.takeScreenshot(ScreenshotCache.java:163)
at com.googlecode.fightinglayoutbugs.ScreenshotCache.getScreenshot(ScreenshotCache.java:77)
at com.googlecode.fightinglayoutbugs.ScreenshotCache.takeScreenshot(ScreenshotCache.java:144)
at com.googlecode.fightinglayoutbugs.WebPage.takeScreenshot(WebPage.java:162)
at com.googlecode.fightinglayoutbugs.AnimationAwareTextDetector.detectTextPixelsIn(AnimationAwareTextDetector.java:78)
at com.googlecode.fightinglayoutbugs.WebPage.getTextPixels(WebPage.java:176)
at com.googlecode.fightinglayoutbugs.DetectTextNearOrOverlappingHorizontalEdge.findLayoutBugsIn(DetectTextNearOrOverlappingHorizontalEdge.java:37)
at com.googlecode.fightinglayoutbugs.FightingLayoutBugs.findLayoutBugsIn(FightingLayoutBugs.java:146)
at com.paddypower.selenium.framework.PageValidation.checkLayoutBugs(PageValidation.java:46)
thanks,
Graham