Bug 4339: GeckoDriver does not accept Cookies with "localhost" as

domain. As we do not use several domains, we can just leave the domain
empty so that the current domain is being used.
This commit is contained in:
Steffen Schaefer committed 2018-04-24 09:10:58 +02:00
1 parent b0d790e335
commit aeb011383b
1 file changed
+2 -1
@@ -92,7 +92,8 @@ public abstract class AbstractSeleniumTest {
logger.info("Authenticating session...");
Cookie sessionCookie = authenticate(getContextRoot());
getWebDriver().get(getContextRoot() + "index.html"); // initialize web driver so setting a cookie for the local domain is possible
getWebDriver().manage().addCookie(sessionCookie);
final Cookie cookieWithoutDomain = new Cookie(sessionCookie.getName(), sessionCookie.getValue(), null, sessionCookie.getPath(), sessionCookie.getExpiry(), sessionCookie.isSecure(), sessionCookie.isHttpOnly());
getWebDriver().manage().addCookie(cookieWithoutDomain);
logger.info("...obtained session cookie "+sessionCookie);
}