
Unable to set user preference on launching browser through codeceptjs
I have created a test profile and added the below line in prefs.js file user_perf("network.cookie.cookieBehavior",0);
Below is the desiredCapabilities section for codecept config file. desiredCapabilities: {
moz:firefoxOptions: { args: ['--ignore-certificate-errors', '-headless', '-profile', '/path/to/my/testProfile'] },
}
When the browser is launched it creates a temporary profile where my network cookie behavior change is not reflected and also the browser is not headless.
To set the network cookie behavior value to 0 I also used the below desiredCapabilities which also didn't work. desiredCapabilities: {
moz:firefoxOptions: { args: ['--ignore-certificate-errors', '-headless', '-profile', '/path/to/my/testProfile'], prefs: { "network.cookie.cookieBehavior": 0 } },
}
I have created a test profile and added the below line in prefs.js file
user_perf("network.cookie.cookieBehavior",0);
Below is the desiredCapabilities section for codecept config file.
desiredCapabilities: {
moz:firefoxOptions: {
args: ['--ignore-certificate-errors', '-headless', '-profile', '/path/to/my/testProfile']
},
}
When the browser is launched it creates a temporary profile where my network cookie behavior change is not reflected and also the browser is not headless.
To set the network cookie behavior value to 0 I also used the below desiredCapabilities which also didn't work.
desiredCapabilities: {
moz:firefoxOptions: {
args: ['--ignore-certificate-errors', '-headless', '-profile', '/path/to/my/testProfile'],
prefs: { "network.cookie.cookieBehavior": 0 }
},
}