How to configure Protractor to work on FireFox and enable CORS

I run my protractor tests using Chrome, and I would also like to run them with Firefox. The problem is that I cannot find how to enable CORS in firefox, like in Chrome. This is my configuration for Chrome:

capabilities:{
    'browserName': 'chrome',
    'chromeOptions': {
        'args': ['--disable-web-security']
    }
},
+4
source share
2 answers

I do not want to say this, but FireFox does not have similar functionality. In fact, of the four main browsers (Chrome, Safari, FF, and IE), only Chrome and IE will allow you to work with disabled web protection and only Chrome from the command line.

: CORS , Chrome IE.

0

selenium webdriverjs

npm: https://github.com/saadtazi/firefox-profile-js

var FirefoxProfile = require('firefox-profile'),
webdriverjs = require('webdriverjs');

var fp = new FirefoxProfile();
fp.setPreference("security.fileuri.strict_origin_policy", false);

firefox Protractor

https://github.com/juliemr/protractor-demo/tree/master/howtos/setFirefoxProfile

0

Source: https://habr.com/ru/post/1613096/


All Articles