People seem to have some problems when it comes to testing file uploads with Selenium RC. Im not the first to provide a solution but making this work with Selenium RC might take a few more steps.

With Selenium RC you get a fresh browser each time you start a test run. So youll need to add this to your default profile in a You can upload files with Firefox if you build a custom profile with relaxed Javascript securities. You wouldnt want to run this relaxed security version against any code that you dont trust obviously, so be careful.

Step 1. Create a new Firefox profile. Step 2. Edit prefs.js to include:

user_pref("signed.applets.codebase_principal_support", true);
Step 3. Modify your AUT (this is why this is bad way to test file uploads via Selenium) to request enhanced permissions via:

netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead"); 
// This gives Javascript the ability to open file:// URI's.
Step 4. Visit your AUT using the profile youve just created, youll hopefully be greeted with a warning asking you if Javascript should be allowed UniversalFileRead permissions. Clicking yes will add entries to your prefs.js file that look like the following:

user_pref("capability.principal.codebase.p0.granted", "UniversalFileRead");
user_pref("capability.principal.codebase.p0.id", "http://your_aut_domain.com");
user_pref("capability.principal.codebase.p0.subjectName", "");
You can then edit your SeleniumRC instance to launch FireFox using this specific profile.


>>>>>>In Selenium we then have to request the privilege to upload local files by adding the following JavaScript snippet to the function Selenium.prototype.doType in the file selenium-api.js:

>>>> Unfortunately no solution for getting rid of the file download SAVE dialod. It is conent-servdisposition HTTP header server issue