|
26 | 26 | import static org.junit.Assert.assertFalse;
|
27 | 27 | import static org.junit.Assert.assertTrue;
|
28 | 28 | import static org.junit.Assert.fail;
|
| 29 | +import static org.junit.Assume.assumeFalse; |
29 | 30 | import static org.junit.Assume.assumeTrue;
|
| 31 | +import static org.openqa.selenium.Platform.LINUX; |
30 | 32 | import static org.openqa.selenium.support.ui.ExpectedConditions.frameToBeAvailableAndSwitchToIt;
|
31 | 33 | import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;
|
32 | 34 | import static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOfAllElementsLocatedBy;
|
|
36 | 38 | import static org.openqa.selenium.testing.Ignore.Driver.MARIONETTE;
|
37 | 39 | import static org.openqa.selenium.testing.Ignore.Driver.PHANTOMJS;
|
38 | 40 | import static org.openqa.selenium.testing.Ignore.Driver.SAFARI;
|
| 41 | +import static org.openqa.selenium.testing.TestUtilities.getEffectivePlatform; |
| 42 | +import static org.openqa.selenium.testing.TestUtilities.isChrome; |
39 | 43 |
|
40 | 44 | import com.google.common.collect.Sets;
|
| 45 | +import org.openqa.selenium.testing.drivers.SauceDriver; |
41 | 46 |
|
42 | 47 | import java.awt.image.BufferedImage;
|
43 | 48 | import java.awt.image.Raster;
|
@@ -117,6 +122,10 @@ public void testGetScreenshotAsBinary() throws Exception {
|
117 | 122 |
|
118 | 123 | @Test
|
119 | 124 | public void testShouldCaptureScreenshotOfCurrentViewport() throws Exception {
|
| 125 | + // Fails on Sauce for whatever reason; probably display or window manager. |
| 126 | + assumeFalse(SauceDriver.shouldUseSauce() |
| 127 | + && getEffectivePlatform(driver).is(LINUX) |
| 128 | + && isChrome(driver)); |
120 | 129 | driver.get(appServer.whereIs("screen/screen.html"));
|
121 | 130 |
|
122 | 131 | BufferedImage screenshot = getImage();
|
@@ -253,6 +262,10 @@ public void testShouldCaptureScreenshotOfPageWithTooLongXandY() throws Exception
|
253 | 262 | reason = " IE: v9 shows strange border which broke color comparison"
|
254 | 263 | )
|
255 | 264 | public void testShouldCaptureScreenshotAtFramePage() throws Exception {
|
| 265 | + // Fails on Sauce for whatever reason; probably display or window manager. |
| 266 | + assumeFalse(SauceDriver.shouldUseSauce() |
| 267 | + && getEffectivePlatform(driver).is(LINUX) |
| 268 | + && isChrome(driver)); |
256 | 269 | driver.get(appServer.whereIs("screen/screen_frames.html"));
|
257 | 270 | wait.until(frameToBeAvailableAndSwitchToIt(By.id("frame1")));
|
258 | 271 | wait.until(visibilityOfAllElementsLocatedBy(By.id("content")));
|
@@ -316,6 +329,10 @@ public void testShouldCaptureScreenshotAtIFramePage() throws Exception {
|
316 | 329 | reason = "IE: v9 shows strange border which broke color comparison"
|
317 | 330 | )
|
318 | 331 | public void testShouldCaptureScreenshotAtFramePageAfterSwitching() throws Exception {
|
| 332 | + // Fails on Sauce for whatever reason; probably display or window manager. |
| 333 | + assumeFalse(SauceDriver.shouldUseSauce() |
| 334 | + && getEffectivePlatform(driver).is(LINUX) |
| 335 | + && isChrome(driver)); |
319 | 336 | driver.get(appServer.whereIs("screen/screen_frames.html"));
|
320 | 337 |
|
321 | 338 | driver.switchTo().frame(driver.findElement(By.id("frame2")));
|
|
0 commit comments