Permalink
Browse files

Adding another file upload test, which crashes PhantomJS

  • Loading branch information...
1 parent 55b5d26 commit c11dfb696bf8f502f196372ac870a7ab2fe60b88 @jimevans jimevans committed Oct 31, 2012
Showing with 18 additions and 0 deletions.
  1. +18 −0 test/java/src/test/java/ghostdriver/FileUploadTest.java
@@ -77,6 +77,24 @@ public void checkFileUploadCompletes() throws IOException {
}
@Test
+ public void checkUploadingTheSameFileMultipleTimes() throws IOException {
+ WebDriver d = getDriver();
+
+ File file = File.createTempFile("test", "txt");
+ file.deleteOnExit();
+
+ d.get("http://ci.seleniumhq.org:2310/common/formPage.html");
+ WebElement uploadElement = d.findElement(By.id("upload"));
+ uploadElement.sendKeys(file.getAbsolutePath());
+ uploadElement.submit();
+
+ d.get("http://ci.seleniumhq.org:2310/common/formPage.html");
+ uploadElement = d.findElement(By.id("upload"));
+ uploadElement.sendKeys(file.getAbsolutePath());
+ uploadElement.submit();
+ }
+
+ @Test
public void checkOnChangeEventIsFiredOnFileUpload() throws IOException {
WebDriver d = getDriver();

0 comments on commit c11dfb6

Please sign in to comment.