-
Notifications
You must be signed in to change notification settings - Fork 409
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
can not add cookie #130
Comments
What are the values of the errors that you are discarding from |
@minusnine |
webDriver.AddCookie(&selenium.Cookie{ add cookie no return cookie |
?????? |
�I have the same problem, After adding a cookie, refresh, I still can not get the added cookie. Here are the codes, anybody has any idea? |
I have the same problem..... |
This test currently passes: Line 1183 in 0a9bce4
Can you please provide debug logs from Geckodriver or ChromeDriver? See here for an example of how to do that: Line 147 in 0a9bce4
Or better:
|
Have you solved this problem? |
My issue was that the cookie was expiring immediately, I added an epoch timestamp in the future to get it to stick |
oh.. I have the same problem..... |
thanks to @minusnine 's advice , I solve this issue by strictly follow demo and rewrite the code session := &selenium.Cookie{
Name: "session",
Value: "32904a4ac31a5a34984070740553a2ca",
Expiry: math.MaxUint32,
}
session.Domain = "10.250.129.10"
session.Path = "/"
err = wd.AddCookie(session)````
and it works !!! |
I have the same problem ... i try to set Expiry to math.MaxUint32, but it still doesn't work : (
Is there anyone can help me? |
Oh...I have solved this problem,if anyone have set Expiry to math.MaxUint32 and the code is still doesn't work, try the following ideas. You should load the webpage first so that selenium knows which website the cookie belongs to, although the behavior of loading the webpage is not useful to us. Thanks for @lidaling 's advice.
|
the following code is working for me
|
After adding a cookie, refresh, I still can not get the added cookie. Here are the codes, anybody has any idea?
Thanks.
The text was updated successfully, but these errors were encountered: