3

here's the situation: I load a website A in incognito mode using Selenium Chrome Webdriver. In this website there is a iframe loading information from website B. Chrome Incognito mode blocks the iframe contents because treats it as a 3rd party cookie.

If I allow the cookies from the website B the conents of the iframe show up. If I don't use the incognito mode the contents also show up. However, after manually allowing cookies in Chrome setting it only works during this session. And I need the incognito mode in other tests so I don't want to change configuration between the tests.

Is there a way to set up the Webdriver to allow the cookies from the 3rd party website?

zmijman
  • 31
  • 3
  • Maybe check here: https://stackoverflow.com/questions/32381946/disabling-cookies-in-webdriver-for-chrome-firefox (They are using "2" to not allow but hack it out... you may want "0", or "1", etc..) I think "0" is allow. – pcalkins Oct 07 '21 at 21:40
  • Actually I worked around my problem by running the webdriver in headless mode. Somehow it allows the cookies in incognito headless mode. – zmijman Oct 16 '21 at 20:19

0 Answers0