w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
336 stars 35 forks source link

Add a step to validate if a user context exists to cookie APIs #672

Open lutien opened 4 months ago

lutien commented 4 months ago

To align with other commands in case of using in partition field userContext id when sending one of the cookie commands, we should probably validate if the user context associated with the provided id exists and throw the no such user context error in case it doesn't.

whimboo commented 4 months ago

That make sense to me. We should not silently ignore it which could lead to false results.

OrKoN commented 3 months ago

It looks like the algorithm https://w3c.github.io/webdriver-bidi/#get-the-cookie-store does the validation (for the storage existence) already? I think it is strictly speaking not required to have a user context to access a storage partition with a user context id key matching to a certain string. It also might be useful for testing browser implementations.