I am currently facing a challenge with Protractor as I try to access an HTML file as a website using it. Whenever I attempt to do so, I encounter an error from Protractor stating:
Failed: Access to 'file:///C:/filelocation/index.html' from script denied
Build info: version: '2.48.2', revision: '41bccdd', time: '2015-10-09 19:59:12'
System info: host: 'BAHCND4397GQF', ip: '10.138.1.189', os.name: 'Windows 7', os.arch: 'amd64',os.version: '6.1', java.version: '1.8.0_72'
Driver info: driver.version: unknown
After some research online, I discovered that the issue was specific to Firefox and can be resolved by adding the following lines to a 'user.js' file:
user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.sites", "C:/MendisSoftwareList/Software%20List/cwmdt-applications-parent/common-parent/index.html");
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
I learned that this 'user.js' file must be located in the Firefox Profile I am using, which I have placed here:
C:\Users\userName\AppData\Roaming\Mozilla\Firefox\Profiles\Profile
Unfortunately, despite my efforts, I have not been successful in resolving the issue. I am now seeking any assistance or guidance on how to proceed further. Below are some resources I have consulted:
https://groups.google.com/forum/#!msg/selenium-users/Guh9x4HEWls/pbEjrsq5pXUJ
http://kb.mozillazine.org/User.js_file
https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/6373
Thank you for your help.