4242import org .junit .Test ;
4343import org .openqa .selenium .testing .Ignore ;
4444import org .openqa .selenium .testing .JUnit4TestBase ;
45+ import org .openqa .selenium .testing .NotYetImplemented ;
4546import org .openqa .selenium .testing .SwitchToTopAfterTest ;
4647import org .openqa .selenium .testing .drivers .SauceDriver ;
4748
8182@ Ignore (value = {IE }, reason = "IE: strange colors appeared" )
8283public class TakesScreenshotTest extends JUnit4TestBase {
8384
84- private TakesScreenshot screenshoter ;
85+ private TakesScreenshot screenshooter ;
8586 private File tempFile = null ;
8687
8788 @ Before
8889 public void setUp () throws Exception {
8990 assumeTrue (driver instanceof TakesScreenshot );
90- screenshoter = (TakesScreenshot ) driver ;
91+ screenshooter = (TakesScreenshot ) driver ;
9192 }
9293
9394 @ After
@@ -101,26 +102,27 @@ public void tearDown() {
101102 @ Test
102103 public void testGetScreenshotAsFile () throws Exception {
103104 driver .get (pages .simpleTestPage );
104- tempFile = screenshoter .getScreenshotAs (OutputType .FILE );
105+ tempFile = screenshooter .getScreenshotAs (OutputType .FILE );
105106 assertTrue (tempFile .exists ());
106107 assertTrue (tempFile .length () > 0 );
107108 }
108109
109110 @ Test
110111 public void testGetScreenshotAsBase64 () throws Exception {
111112 driver .get (pages .simpleTestPage );
112- String screenshot = screenshoter .getScreenshotAs (OutputType .BASE64 );
113+ String screenshot = screenshooter .getScreenshotAs (OutputType .BASE64 );
113114 assertTrue (screenshot .length () > 0 );
114115 }
115116
116117 @ Test
117118 public void testGetScreenshotAsBinary () throws Exception {
118119 driver .get (pages .simpleTestPage );
119- byte [] screenshot = screenshoter .getScreenshotAs (OutputType .BYTES );
120+ byte [] screenshot = screenshooter .getScreenshotAs (OutputType .BYTES );
120121 assertTrue (screenshot .length > 0 );
121122 }
122123
123124 @ Test
125+ @ NotYetImplemented (value = CHROME , reason = "Fails unexpectedly" )
124126 public void testShouldCaptureScreenshotOfCurrentViewport () throws Exception {
125127 // Fails on Sauce for whatever reason; probably display or window manager.
126128 assumeFalse (SauceDriver .shouldUseSauce ()
@@ -261,6 +263,7 @@ public void testShouldCaptureScreenshotOfPageWithTooLongXandY() throws Exception
261263 value = {IE },
262264 reason = " IE: v9 shows strange border which broke color comparison"
263265 )
266+ @ NotYetImplemented (value = CHROME , reason = "Fails unexpectedly" )
264267 public void testShouldCaptureScreenshotAtFramePage () throws Exception {
265268 // Fails on Sauce for whatever reason; probably display or window manager.
266269 assumeFalse (SauceDriver .shouldUseSauce ()
@@ -327,6 +330,7 @@ public void testShouldCaptureScreenshotAtIFramePage() throws Exception {
327330 value = {IE , MARIONETTE },
328331 reason = "IE: v9 shows strange border which broke color comparison"
329332 )
333+ @ NotYetImplemented (value = CHROME , reason = "Fails unexpectedly" )
330334 public void testShouldCaptureScreenshotAtFramePageAfterSwitching () throws Exception {
331335 // Fails on Sauce for whatever reason; probably display or window manager.
332336 assumeFalse (SauceDriver .shouldUseSauce ()
@@ -397,7 +401,7 @@ public void testShouldCaptureScreenshotAtIFramePageAfterSwitching() throws Excep
397401 private BufferedImage getImage () {
398402 BufferedImage image = null ;
399403 try {
400- byte [] imageData = screenshoter .getScreenshotAs (OutputType .BYTES );
404+ byte [] imageData = screenshooter .getScreenshotAs (OutputType .BYTES );
401405 assertTrue (imageData != null );
402406 assertTrue (imageData .length > 0 );
403407 image = ImageIO .read (new ByteArrayInputStream (imageData ));
0 commit comments