Tuesday, November 28, 2006

File Upload in Selenium on Rails

Hi Friend z,

File Upload in Selenium on Rails.

to make selenium able to fill type="file" input via "type" command:

a) set configuration for mozilla

signed.applets.codebase_principal_support = true

in firefox about:config page

type about:config in addressbar of firefox.

b) add a line in selenium-api.js

netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead") ;

to \vendor\selenium\core\scripts\selenium-api.js method Selenium.prototype.doType()

It will be definetely useful.
This thing works only in mozilla.

Enjoy Rails

1 comment:

JAYARAM PRASAD P said...

Hi,
I didnt find that method(Selenium.prototype.doType())
in selenium-api.js....
Can u give complete details...

Pay Pal

Sign up for PayPal and start accepting credit card payments instantly.

Ruby Corner

Earn Money