-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cookie.sameSite does not defaults to None
, if omitted while adding a cookie
#7555
Comments
Thanks for raising the issue.
As far as I know the sameSite option is omitted if not explicitly set. If you don't see it set it means it is set to I will close this because WebdriverIO follows the WebDriver protocol and depends on how the browser driver is setting the cookie in the browser. |
Just to give a context, running this below code using the setup has allowed me to set the samesite value as https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0/selenium-server-4.0.0.jar
|
I am confused, the protocol says:
But I see in the Selenium project that [Test]
public void ShouldThrowAnExceptionWhenSameSiteIsNoneButNotSecure()
{
Assert.That(() => new ReturnedCookie("name", "value", "", "/", DateTime.Now, false, true, "None"), Throws.InstanceOf<ArgumentException>());
} I seems that |
Added a patch that allows to set |
[//]: # NOTE: This repository only maintains packages that are listed in the Readme. Please make sure that your issue is directly caused by one of these packages and if not file an issue in the correct 3rd party package repository.
Environment (please complete the following information):
Config of WebdriverIO
An example of how you configured WebdriverIO config
Use any boiler plate projects with webdriverio 6 eg: https://github.com/WarleyGabriel/demo-webdriverio-mocha
Describe the bug
While setting the cookie, the cookie.sameSite does not defaults to
None
, when it is ignoredTo Reproduce
Steps to reproduce the behavior:
Use any boiler plate projects with webdriverio 6 eg: https://github.com/WarleyGabriel/demo-webdriverio-mocha
[Include code or an example repository that can easily be set up]
Expected behavior
Cookie should get set in the browser with sameSite as 'None'
Log
If applicable, add logs to help explain your problem.
Create a gist which is a paste of your full Selenium/WebdriverIO logs, and link them here. Do not paste your full Appium logs here, as it will make this issue very long and hard to read! If you are reporting a bug, always include Selenium/WebdriverIO logs!
Additional context
https://github.com/webdriverio/webdriverio/blob/v6/packages/webdriver/webdriver.d.ts#L31
Based on the initial debugging, I do not see the option
None
as a type for SameSiteOptions.The text was updated successfully, but these errors were encountered: