2

Currently I am attempting to (force) use Protractor access a file as a website (an html file). When I attempt to do so, an error from protractor which reads:

    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 searching the internet for a solution I found the issue was a Firefox one with the simple instructions of adding:

    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");

to a 'user.js' file. After more research I have found that this file must be in the Firefox Profile I am attempting to use which I have placed in the location:

    C:\Users\userName\AppData\Roaming\Mozilla\Firefox\Profiles\Profile

to no avail. Quite frankly I am out of ideas. Any help would be appreciated. Here is the list of my resources:

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

Thanks in advance.

jsNoob
  • 139
  • 1
  • 10
  • You mean you need to open your url using firefox? If then try capabilities: { browserName: 'firefox', } – Manuli Mar 18 '16 at 08:35
  • I am currently using Firefox and my browser does open with it. However it crashes immediately after. – jsNoob Mar 18 '16 at 12:51

1 Answers1

0

I have found a partial answer to this question here: Opening a file with protractor

Which serves my needs and accomplishes my goals.

However, I would like to hear a more in-depth answer for my own purposes and that of the community so any and all other questions and comments please feel free to leave another answer or just leave in the comments.

Thanks

Community
  • 1
  • 1
jsNoob
  • 139
  • 1
  • 10