Permalink
Browse files

Merge pull request #113 from jimevans/upload_crash

TEST: Adding another file upload test, which crashes PhantomJS
  • Loading branch information...
2 parents 55b5d26 + c11dfb6 commit 7e7438d04043936a6375a8b80ce9196092067a1b @detro 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 7e7438d

Please sign in to comment.