protractor icon indicating copy to clipboard operation
protractor copied to clipboard

How to disable Firefox Security using Protractor

Open santhoshchunchu opened this issue 12 years ago • 5 comments

Hello All,

I am using dev environment of our application. When I am trying to open it, the firefox browser is showing an Unexpected error. screenshot_3

Then I manually changed or disabled the security by following the below instruction.

SEE BELOW To allow insecure content to be displayed in all secure pages, enter about:config in the address bar and double-click on this preference, to toggle it from true to false: security.mixed_content.block_active_content

https://support.mozilla.org/en-US/questions/971125

I am done with the above steps and tried opening the application and working fine.

But when I started running my scripts using Protractor, the changes which I made were not reflected.

I am getting the error messages as before and browser is stopping me .

screenshot_3

ff error

How can I overcome the issue?

Thanks & Regards, Santhosh Chunchu

santhoshchunchu avatar Sep 17 '14 10:09 santhoshchunchu

Selenium generates a temporary profile, different from the default you just changed. It is related to: https://github.com/angular/protractor/issues/1336

rgalite avatar Sep 18 '14 09:09 rgalite

You have to create a new profile by running firefox with the -p option. And pass it to selenium with the seleniumArgs config.

See: https://github.com/angular/protractor/issues/1336#issuecomment-56079484

erem-ifg avatar Sep 18 '14 18:09 erem-ifg

I have added this firefox_profile: 'support/firefox_profile' and tried but cannot able to resolve my issue. Can you help me out indetail?

santhoshchunchu avatar Sep 19 '14 05:09 santhoshchunchu

Yes.

  • Run firefox with the -p option
  • Create your specific profile. I named mine selenium
  • Run firefox with this profile
  • Make the changes you need in about:config
  • Add this option in protractor configuration:
seleniumArgs: [ "-Dwebdriver.firefox.profile=selenium" ],

This way, your new profile will be used to run your tests.

rgalite avatar Sep 19 '14 16:09 rgalite

Thanks for documenting the fix. Closing as a fixed question.

juliemr avatar Sep 19 '14 21:09 juliemr