Learn R Programming

seleniumPipes (version 0.3.7)

deleteCookie: Delete a given cookie.

Description

deleteCookie Delete the cookie with the give name.

Usage

deleteCookie(remDr, name = NULL, ...)

Arguments

remDr
An object of class "rDriver". A remote driver object see remoteDr.
name
character: The name of the cookie; may not be null or an empty string
...
Additonal function arguments - Currently passes the retry argument.

Value

invisible(remDr): An object of class "rDriver" is invisibly returned. A remote driver object see remoteDr. This allows for chaining from this function to other functions that take such an object as an argument. See examples for further details.

See Also

Other cookies functions: addCookie, deleteAllCookies, getAllCookies, getNamedCookie

Examples

Run this code
## Not run: 
# # assume a server is running at default location
# remDr <- remoteDr()
# remDr %>% go("https://www.google.com/ncr") %>%
#   getTitle()
# # get the cookies
# remDr %>% getCookie()
# # get a named cookie
# remDr %>% getCookie("NID")
# # add our own cookie
# remDr %>% addCookie(name = "myCookie", value = "12")
# # check its value
# remDr %>% getCookie("myCookie")
# # delete our cookie
# remDr %>% deleteCookie("myCookie")
# # check its deleted
# remDr %>% getCookie("myCookie")
# 
# # delete all cookies
# remDr %>% getCookie()
# remDr %>% deleteAllCookies() %>%
#   getCookie()
# 
# remDr %>% deleteSession()
# ## End(Not run)

Run the code above in your browser using DataLab