Open devl00p opened 2 years ago
The domain you are using here is an "effective" TLD at https://publicsuffix.org/list/public_suffix_list.dat , and we are not able to create "domain" cookies for a TLD.
Note that when you pass "domain" to AddCookie, it will not be used as the "Domain" value of the cookie. Instead it will be prefixed with a dot (.httpbin.org
here) to make it a "domain cookie" available from all the subdomains of this domain. But again that's not allowed for TLDs (and effective TLDs apparently).
If you just want to create a cookie with "Domain=httpbin.org" (without making it a "domain cookie"), you can omit the "domain" and it should work fine.
Let me know if that helps. On Firefox' side, I'll see if we can make that error more explicit...
Filed https://bugzilla.mozilla.org/show_bug.cgi?id=1791813 to improve the error message
Hello,
I noticed that something seems to be wrong with the "add cookie" feature. The driver seems to reply that a value of the cookie is incorrect but I followed the webdriver documentation carefully ( https://w3c.github.io/webdriver/#dfn-adding-a-cookie ) and I still can't figure out what is the problem.
I looked at
chrome://remote/content/marionette/cookie.js
too but it didn't help neither.Please find bellow the example code in Python.
What it is doing is:
http://httpbin.org/cookies/set/foo/bar
that sets a cookie for that websiteget cookies
to make sure the cookie was set (which is the case)Geckodriver was launched with
geckodriver --port 38045 -vv
System
Testcase
Stacktrace
cookie.add@chrome://remote/content/marionette/cookie.js:212:20 GeckoDriver.prototype.addCookie@chrome://remote/content/marionette/driver.js:1886:10
Trace-level log