Open GoogleCodeExporter opened 8 years ago
Each time the start command is called, a new and cleaned session without cookie
is created.
Moreover, the related commands will only apply to the cookies from to the
current page domain.
Here is a usage example:
Sub testCookies()
Dim wd As New SeleniumWrapper.WebDriver
wd.Start "firefox", "http://www.google.com"
wd.setImplicitWait 5000
wd.Open "/"
Debug.Print "Cookies: " & wd.getCookie()
Debug.Print "Cookie NID: " & wd.getCookieByName("NID")
Debug.Print "Verify: " & wd.verifyCookie("")
Debug.Print "Delete cookies from domain http://www.google.com"
wd.deleteAllVisibleCookies
Debug.Print "Cookies: " & wd.getCookie()
Debug.Print "Verify: " & wd.verifyCookie("")
wd.assertCookie ""
End Sub
You can handle the cookies from another domain by changing it with the "open"
command:
wd.open "http://domain 1"
wd.deleteAllVisibleCookies
wd.open "http://domain 2"
wd.deleteAllVisibleCookies
...
Original comment by florentbr
on 13 Dec 2014 at 1:34
Original issue reported on code.google.com by
sunilm...@gmail.com
on 11 Dec 2014 at 11:35