w3c / w3c/webdriver

Clarification for "Add Cookie" behavior when trying too set a secure cookie for a non-secure connection

Open
#1,571 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Add Cookie clarification
Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

In chapter 14. Cookies, section 14.3 Add Cookie:

Create a cookie in the cookie store associated with the active document’s address using cookie name name, cookie value value, and an attribute-value list of the following cookie concepts listed in the table for cookie conversion from data:
..
If there is an error during this step, return error with error code unable to set cookie.

It's not that clear by the spec if the cookie should not be set and success returned (as currently done by chromedriver), or similar to other commands a proper error (unable to set cookie) being returned.

If we wont return an error, and the cookie isn't set the webpage/app under test might misbehave at some point. It would not be clear why, and investigation isn't that trivial.

@JohnChen0, @burg, @shs96c what is your take here?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked WebDriver specification sections 14. Cookies and 14.3 Add Cookie, then review the reported ChromeDriver behavior for a secure cookie on a non-secure connection. Done means the specification clearly states whether this case returns success without setting the cookie or returns an unable-to-set-cookie error.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.