Instead of the old and outdated webdriver-common
package, you probably need the newest selenium-java
from http://code.google.com/p/selenium/downloads/list.
If you'll ever also need running Selenium RC locally, or Remote WebDriver ot Selenium Grid, you'll need the selenium-server
package there (if you don't yet know what these are, just take selenium-java
).
In both cases, for running InternetExplorerDriver
, you'll also need the IEDriverServer
from the page mentioned above. It's up to you whether to use the 32 or 64 bit version.
You can find an example of setting it up here in the documentation. If you dig around a bit, you'll find many more useful information in that documentation.
For example, for Internet explorer, you'll do:
System.setProperty("webdriver.ie.driver", "C:\\path\\to\\IEDriverServer.exe");
WebDriver driver = new InternetExplorerDriver();
// your testing code
driver.quit();
Your method of uploading a file is correct.
And as of now (Selenium v2.29.0), you can't download files via any WebDriver. If you really want to do so, you'll have to find another way.