webdriver icon indicating copy to clipboard operation
webdriver copied to clipboard

Wrong error specified by "Add Cookie" for domain mismatch

Open titusfortner opened this issue 4 years ago • 0 comments

In chapter 14. Cookies, section 14.3 Add Cookie:

If cookie name or cookie value is null, cookie domain is not equal to the current browsing context’s active document’s domain, cookie secure only or cookie HTTP only are not boolean types, or cookie expiry time is not an integer type, or it less than 0 or greater than the maximum safe integer, return error with error code invalid argument.

If the cookie domain is not equal to the current browsing context's active document's domain, then it should throw an invalid cookie domain error instead of a generic invalid argument error.

Firefox already does this as expected, but Chrome does not.

titusfortner avatar Feb 05 '21 02:02 titusfortner