-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[🐛 Bug]: driver.Manage().Cookies.AddCookie(); with Native aot(c#) #13363
Comments
@katanakatana123, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
You can't add a cookie that doesn't exist. You need at least a name and value. @nvborisenko shouldn't this fail for not sending a cookie instance to the method? |
The issue is reproduced, thanks for the report. It is related to Native AOT. driver.Url = "https://google.com";
driver.Manage().Cookies.AddCookie(new Cookie("a", "b"));
|
Ah, we have logs! :)
Here we can see that AddCookie command serialized improperly. |
As a workaround you can mark your method, which invokes
I see even more places in selenium code base where json serialization doesn't work properly with Native AOT. Hoping #13097 will resolve it. |
thank, it working, |
Removing it from 4.17 milestone. This is rare case, when we want to be friends with, but cannot do it in discoverable future. I would like to keep it as opened, hoping #13097 resolve it. |
Hi @NCLnclNCL, are you able to help us to test the preview version of selenium package which seems to be AOT compatible (excluding CDP)? We are looking for everybody who is interested in it. @katanakatana123 and you? |
It should be fixed by #14574 |
Verified, will be available in v4.26 |
What happened?
when i use driver.Manage().Cookies.AddCookie(); i got the error OpenQA.Selenium.WebDriverArgumentException: invalid argument: missing 'name',
i think the problem comes from here
selenium/dotnet/src/webdriver/WebDriver.cs
Line 567 in b16d0d8
How can we reproduce the issue?
driver.Manage().Cookies.AddCookie();
Relevant log output
OpenQA.Selenium.WebDriverArgumentException: invalid argument: missing 'name',
Operating System
window 10
Selenium version
newest
What are the browser(s) and version(s) where you see this issue?
120
What are the browser driver(s) and version(s) where you see this issue?
120
Are you using Selenium Grid?
No response
The text was updated successfully, but these errors were encountered: