We can access the plugin/XUL libraries using javascript by overriding the FireFox security settings. I got an opportunity to access the mozmill objects using JavaScript.
Following are the js statements to be triggered
(about:config) set "signed.applets.codebase_principal_support" to true
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
var mozmill = {}; Components.utils.import('resource://mozmill/modules/mozmill.js', mozmill);
var elementslib = {}; Components.utils.import('resource://mozmill/modules/elementslib.js', elementslib);
..... mozmill code
I hope it would be easy integrating plugins with Selenium(experimental) by enabling the privileges for a separate profile. A dialog box will appear (warning message) before accessing
the privilege section this can be avoided by creating a separate profile and replacing the profiles.js file with the privilege set already(do manually and copy the file).
Thanks,
Muhil
No comments:
Post a Comment