@@ -301,7 +301,6 @@ public void ShouldCaptureScreenshotAtFramePage()
301
301
}
302
302
303
303
[ Test ]
304
- [ IgnoreBrowser ( Browser . IE , "Color comparisons fail on IE" ) ]
305
304
public void ShouldCaptureScreenshotAtIFramePage ( )
306
305
{
307
306
ITakesScreenshot screenshotCapableDriver = driver as ITakesScreenshot ;
@@ -312,7 +311,12 @@ public void ShouldCaptureScreenshotAtIFramePage()
312
311
313
312
driver . Url = EnvironmentManager . Instance . UrlBuilder . WhereIs ( "screen/screen_iframes.html" ) ;
314
313
314
+ // Resize the window to avoid scrollbars in screenshot
315
+ Size originalSize = driver . Manage ( ) . Window . Size ;
316
+ driver . Manage ( ) . Window . Size = new Size ( 1040 , 700 ) ;
317
+
315
318
Screenshot screenshot = screenshotCapableDriver . GetScreenshot ( ) ;
319
+ driver . Manage ( ) . Window . Size = originalSize ;
316
320
317
321
HashSet < string > actualColors = ScanActualColors ( screenshot ,
318
322
/* stepX in pixels */ 5 ,
@@ -366,7 +370,6 @@ public void ShouldCaptureScreenshotAtFramePageAfterSwitching()
366
370
}
367
371
368
372
[ Test ]
369
- [ IgnoreBrowser ( Browser . IE , "Color comparisons fail on IE" ) ]
370
373
[ IgnoreBrowser ( Browser . Firefox , "Color comparisons fail on Firefox" ) ]
371
374
public void ShouldCaptureScreenshotAtIFramePageAfterSwitching ( )
372
375
{
@@ -378,9 +381,14 @@ public void ShouldCaptureScreenshotAtIFramePageAfterSwitching()
378
381
379
382
driver . Url = EnvironmentManager . Instance . UrlBuilder . WhereIs ( "screen/screen_iframes.html" ) ;
380
383
384
+ // Resize the window to avoid scrollbars in screenshot
385
+ Size originalSize = driver . Manage ( ) . Window . Size ;
386
+ driver . Manage ( ) . Window . Size = new Size ( 1040 , 700 ) ;
387
+
381
388
driver . SwitchTo ( ) . Frame ( driver . FindElement ( By . Id ( "iframe2" ) ) ) ;
382
389
383
390
Screenshot screenshot = screenshotCapableDriver . GetScreenshot ( ) ;
391
+ driver . Manage ( ) . Window . Size = originalSize ;
384
392
385
393
HashSet < string > actualColors = ScanActualColors ( screenshot ,
386
394
/* stepX in pixels */ 5 ,
0 commit comments