Allow all Cookies

Cookies are allowed by default on Chrome and Firefox browsers. However to allow cookies on Safari browser, you can use the browserstack.safari.allowAllCookies capability.

Capability Description Expected values
browserstack.safari.allowAllCookies Enable all cookies in Safari A string. Default is false.
true if you want to enable all cookies in Safari

For example, you can allow all cookies in Safari as shown below:

// Allowing all cookies in Safari

DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("browserstack.safari.allowAllCookies", "true")
// Allowing all cookies in Safari

var capabilities = {
 'browserstack.safari.allowAllCookies' : 'true'
}
// Allowing all cookies in Safari

// For Chrome browser
ChromeOptions capability = new ChromeOptions();
capability.AddAdditionalCapability("browserstack.safari.allowAllCookies", true);

// For Edge browser
EdgeOptions capability = new EdgeOptions();
capability.AddAdditionalCapability("browserstack.safari.allowAllCookies", true);

// For IE browser
InternetExplorerOptions capability = new InternetExplorerOptions();
capability.AddAdditionalCapability("browserstack.safari.allowAllCookies", true);

// For Firefox browser
FirefoxOptions capability = new FirefoxOptions();
capability.AddAdditionalCapability("browserstack.safari.allowAllCookies", true);
# Allowing all cookies in Safari

$caps = array(
 "browserstack.safari.allowAllCookies" => "true"
);
# Allowing all cookies in Safari

capabilities = {
 "browserstack.safari.allowAllCookies": "true"
}
# Allowing all cookies in Safari

caps = Selenium::WebDriver::Remote::Capabilities.new
caps["browserstack.safari.allowAllCookies"] = "true"
# Allowing all cookies in Safari

my $capabilities = {
  "browserstack.safari.allowAllCookies" => "true"
}
Note: You can disallow cookies on Chrome and Firefox browsers using ChromeOptions and FirefoxProfile. To know more, refer here

We're sorry to hear that. Please share your feedback so we can do better






Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better






Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to automation expert