Selenium can only interact with cookies that can be seen in the
JavaScript console, in other words if you can see the cookie in the
JavaScript console when you do a
document.cookie
Selenium will also be able to see it.
You can still attempt to overwrite a server side cookie manually by
creating a cookie with the same name and path, an example would be the
following:
Cookie logout = new
Cookie("SPRING_SECURITY_REMEMBER_ME_COOKIE", "", "
www.mydomain.com", new
LocalDate().minusYears(1).toDate())
driver.manage().addCookie(logout)
The above will work with Safari at the moment, however you mileage may
vary with other browsers. You shouldn't really be able to overwrite
server side cookies in this manner.
On 03/05/2013 09:04, David Lai wrote:
> I'm stumped on this myself. yesterday I found out there was a bug
> with clearing cookies in the Safari webdriver, and been searching for
> a workaround for clearing/invalidating oauth cookies. --
> You received this message because you are subscribed to the Google
> Groups "Selenium Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
selenium-user...@googlegroups.com.
> To post to this group, send email to
seleniu...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/selenium-users/-/hKrUh8ebsgsJ.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>