Cookies¶
This is a JavaScript wrapper for Cookies of Selenium .NET library.
Action Summary¶
Action | Description |
---|---|
AddCookie | Adds a cookie to the current page. |
AllCookies | Gets all cookies defined for the current page. |
DeleteAllCookies | Deletes the cookie with the specified name from the page. |
DeleteCookie | Deletes the specified cookie from the page. |
DeleteCookieNamed | Deletes the cookie with the specified name from the page. |
GetCookieNamed | Gets a cookie with the specified name. |
Action Detail¶
AddCookie¶
Adds a cookie to the current page.
Cookies.AddCookie(cookie)
Parameters:
Name | Type | Description |
---|---|---|
cookie | Cookie | Cookie object, e.g. {Name: "CookieName", Value: "CookieValue", Domain: "example.com", Path: "/", Expiry: "2018-12-28T13:15.00-05:00"}. |
AllCookies¶
Gets all cookies defined for the current page.
Cookies.AllCookies()
DeleteAllCookies¶
Deletes the cookie with the specified name from the page.
Cookies.DeleteAllCookies()
DeleteCookie¶
Deletes the specified cookie from the page.
Cookies.DeleteCookie(cookie)
Parameters:
Name | Type | Description |
---|---|---|
cookie | Cookie | Cookie object, e.g. {Name: "CookieName", Value: "CookieValue", Domain: "example.com", Path: "/", Expiry: "2018-12-28T13:15.00-05:00"}. |
DeleteCookieNamed¶
Deletes the cookie with the specified name from the page.
Cookies.DeleteCookieNamed(name)
Parameters:
Name | Type | Description |
---|---|---|
name | string | The name of the cookie to be deleted. |
GetCookieNamed¶
Gets a cookie with the specified name.
Cookies.GetCookieNamed(name)
Parameters:
Name | Type | Description |
---|---|---|
name | string | The name of the cookie to retrieve. |