Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Unable to set user preference on launching browser through codeceptjs

  • Atsakymų nėra
  • 0 have this problem
  • 8 views
more options

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 } }, }