How to Allow third-party cookies from karate-config.js file

55 views Asked by At

I have a few features that are not working because the Third-party cookies are blocking them. Can we enable it from the karate-config.js file?

  1. Allow sites to save and read cookie data (recommended)

  2. Block third-party cookies (Default)

This is how we initialize the karate driver.

karate.configure('driver',  {
    type:  browser,
    addOptions: [ '--disable-popup-blocking', '--disable-notifications' ]
});

I'm expecting to enable the third-party cookies using karate.

Update

This is from selenium/python, I want to replicate it on karate:

from selenium import webdriver

chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option("prefs", {"profile.block_third_party_cookies": False})

driver = webdriver.Chrome(chrome_options=chrome_options)
0

There are 0 answers