org.openqa.selenium
Class Cookie
java.lang.Object
org.openqa.selenium.Cookie
- Direct Known Subclasses:
- ReturnedCookie
public class Cookie
- extends java.lang.Object
|
Constructor Summary |
Cookie(java.lang.String name,
java.lang.String value)
Create a cookie for the default path with the given name and value with
no expiry set. |
Cookie(java.lang.String name,
java.lang.String value,
java.lang.String path)
Create a cookie. |
Cookie(java.lang.String name,
java.lang.String value,
java.lang.String path,
java.util.Date expiry)
Creates a cookie. |
Cookie(java.lang.String name,
java.lang.String value,
java.lang.String domain,
java.lang.String path,
java.util.Date expiry)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Cookie
public Cookie(java.lang.String name,
java.lang.String value,
java.lang.String path,
java.util.Date expiry)
- Creates a cookie. If the path is left blank or set to null it will be
set to "/"
- Parameters:
name - name cannot be null or empty stringvalue - value can be an empty string but not be nullpath - The path to use. Will default to "/"expiry - expiry can be null
Cookie
public Cookie(java.lang.String name,
java.lang.String value,
java.lang.String domain,
java.lang.String path,
java.util.Date expiry)
Cookie
public Cookie(java.lang.String name,
java.lang.String value)
- Create a cookie for the default path with the given name and value with
no expiry set.
- Parameters:
name - The cookie's namevalue - The cookie's value
Cookie
public Cookie(java.lang.String name,
java.lang.String value,
java.lang.String path)
- Create a cookie.
- Parameters:
name - The cookie's namevalue - The cookie's valuepath - The path the cookie is for
getName
public java.lang.String getName()
getValue
public java.lang.String getValue()
getDomain
public java.lang.String getDomain()
getPath
public java.lang.String getPath()
isSecure
public boolean isSecure()
getExpiry
public java.util.Date getExpiry()
validate
protected void validate()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Two cookies are equal if the name and value match
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
Copyright © 2010. All Rights Reserved.