title: Upload file from webapp with selenium webDriver
body: <p>My project tree</p>
  
  <pre><code>Project
      JavaRessources
          src/test/java
              myclass.java
      DeployedRessources
          webApp
              myFile.txt
  </code></pre>
  
  <p>in my class.java i want to upload myFile.txt with selenium webdriver:</p>
  
  <pre><code>driver.findElement(By.id("upload1")).sendKeys("myFile.txt");
  </code></pre>
  
  <p>when i do :</p>
  
  <pre><code>private void verifyFile(final String myId, final String src) {
          final WebElement file = this.driver.findElement(By.id(myId));
          final String value = file.getAttribute("value");
          assertEquals("name of uploaded file: ", src, value);
      }
   verifyFile("upload1", "myFile.txt");
  </code></pre>
  
  <p>it return : <code>name of uploaded file: expected: [myFile.txt] but was []</code></p>
  
  <p>so i dont know how to use relative path to upload this file with seleniumWebDriver</p>
  
  <p>Thanks</p>