markhobson / docker-maven-chrome

Docker image for Java automated UI tests.
https://hub.docker.com/r/markhobson/maven-chrome/
Apache License 2.0
97 stars 81 forks source link

Cookies disabled in the latest chromedriver for KEYCLOAK (any thirdparty) #52

Closed mukulsehra closed 6 months ago

mukulsehra commented 8 months ago

@markhobson : I am using this image(markhobson/maven-chrome:jdk-17) in gitlab runner and before the latest update of chromedriver to ver 119, the test cases were running perfectly (in ver 114).

From past two days the scripts started failing.

We are using the Keycloak login for our application and after the latest update of this image we are getting the Cookies disabled issues and screenshot for the same has been attached. Can you please help me out in how to get this issues resolved ?

image

used the below mentioned code to add cookies but no success :

Cookie cookie = new Cookie.Builder("key", "value").sameSite("Strict").build();
      Cookie cookie1 = new Cookie.Builder("key", "value").sameSite("Lax").build();
      driver.manage().addCookie(cookie);
      driver.manage().addCookie(cookie1);

Thanks in advance Mukul Sehra (QA)

markhobson commented 8 months ago

Hi @mukulsehra, I'm aware that Chrome has had some recent changes regarding cookies, which may or may not be related to what you're seeing. This image just contains standard Chrome, so I'd recommend asking Keycloak/Selenium/Chrome instead.

As a workaround, you can always use Docker digests to fix your CI for now.

markhobson commented 6 months ago

Closing due to inactivity.