Skip to content

Commit 83dd02b

Browse files
committed
Ignore tests on Chrome for Android
1 parent 54a195f commit 83dd02b

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

java/client/test/org/openqa/selenium/ClickTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import static org.junit.Assert.assertTrue;
2222
import static org.junit.Assert.fail;
2323
import static org.junit.Assume.assumeFalse;
24+
import static org.openqa.selenium.Platform.ANDROID;
2425
import static org.openqa.selenium.WaitingConditions.newWindowIsOpened;
2526
import static org.openqa.selenium.WaitingConditions.pageSourceToContain;
2627
import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;
@@ -30,6 +31,8 @@
3031
import static org.openqa.selenium.testing.Ignore.Driver.OPERA;
3132
import static org.openqa.selenium.testing.Ignore.Driver.OPERA_MOBILE;
3233
import static org.openqa.selenium.testing.Ignore.Driver.SAFARI;
34+
import static org.openqa.selenium.testing.TestUtilities.isChrome;
35+
import static org.openqa.selenium.testing.TestUtilities.getEffectivePlatform;
3336
import static org.openqa.selenium.testing.TestUtilities.isFirefox;
3437
import static org.openqa.selenium.testing.TestUtilities.isNativeEventsEnabled;
3538

@@ -232,6 +235,9 @@ public void testCanClickOnALinkThatContainsTextWrappedInASpan() {
232235
@Test
233236
@Ignore(MARIONETTE)
234237
public void testCanClickOnALinkThatContainsEmbeddedBlockElements() {
238+
assumeFalse(
239+
"Fails on Android phones: https://code.google.com/p/chromedriver/issues/detail?id=1022",
240+
isChrome(driver) && getEffectivePlatform(driver).is(ANDROID));
235241
driver.findElement(By.id("embeddedBlock")).click();
236242
wait.until(titleIs("XHTML Test Page"));
237243
}

java/client/test/org/openqa/selenium/PageLoadingTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import static org.junit.Assert.fail;
3131
import static org.junit.Assume.assumeFalse;
3232
import static org.junit.Assume.assumeTrue;
33+
import static org.openqa.selenium.Platform.ANDROID;
3334
import static org.openqa.selenium.WaitingConditions.elementTextToContain;
3435
import static org.openqa.selenium.WaitingConditions.elementTextToEqual;
3536
import static org.openqa.selenium.WaitingConditions.newWindowIsOpened;
@@ -46,6 +47,8 @@
4647
import static org.openqa.selenium.testing.Ignore.Driver.OPERA_MOBILE;
4748
import static org.openqa.selenium.testing.Ignore.Driver.PHANTOMJS;
4849
import static org.openqa.selenium.testing.Ignore.Driver.SAFARI;
50+
import static org.openqa.selenium.testing.TestUtilities.isChrome;
51+
import static org.openqa.selenium.testing.TestUtilities.getEffectivePlatform;
4952
import static org.openqa.selenium.testing.TestUtilities.isFirefox;
5053
import static org.openqa.selenium.testing.TestUtilities.isLocal;
5154
import static org.openqa.selenium.testing.TestUtilities.isNativeEventsEnabled;
@@ -256,6 +259,10 @@ public void testShouldBeAbleToLoadAPageWithFramesetsAndWaitUntilAllFramesAreLoad
256259
@NoDriverAfterTest
257260
@Test
258261
public void testShouldDoNothingIfThereIsNothingToGoBackTo() {
262+
assumeFalse(
263+
"chromedriver does not disable popup blocker on Android: "
264+
+ "https://code.google.com/p/chromedriver/issues/detail?id=1021",
265+
isChrome(driver) && getEffectivePlatform(driver).is(ANDROID));
259266
Set<String> currentWindowHandles = driver.getWindowHandles();
260267
((JavascriptExecutor) driver).executeScript(
261268
"window.open('" + pages.formPage + "', 'newWindow')");

java/client/test/org/openqa/selenium/UploadTest.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
package org.openqa.selenium;
1919

20+
import static org.junit.Assume.assumeFalse;
21+
import static org.openqa.selenium.Platform.ANDROID;
2022
import static org.openqa.selenium.WaitingConditions.elementTextToEqual;
2123
import static org.openqa.selenium.support.ui.ExpectedConditions.not;
2224
import static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOf;
@@ -33,6 +35,7 @@
3335
import org.openqa.selenium.testing.Ignore;
3436
import org.openqa.selenium.testing.JUnit4TestBase;
3537
import org.openqa.selenium.testing.JavascriptEnabled;
38+
import org.openqa.selenium.testing.TestUtilities;
3639

3740
import java.io.File;
3841
import java.io.IOException;
@@ -58,6 +61,10 @@ public void setUp() throws Exception {
5861
reason = "Opera/Opera Mobile: File input elements are not supported yet")
5962
@Test
6063
public void testFileUploading() throws Exception {
64+
assumeFalse(
65+
"This test as written assumes a file on local disk is accessible to the browser. "
66+
+ "That is not true for browsers on mobile platforms.",
67+
TestUtilities.getEffectivePlatform(driver).is(ANDROID));
6168
driver.get(pages.uploadPage);
6269
driver.findElement(By.id("upload")).sendKeys(testFile.getAbsolutePath());
6370
driver.findElement(By.id("go")).submit();
@@ -79,4 +86,4 @@ private File createTmpFile(String content) throws IOException {
7986
return f;
8087
}
8188

82-
}
89+
}

0 commit comments

Comments
 (0)