update,
This commit is contained in:
17
task1/task1-ticket1/_ref/Excel/Examples/usage_cookies.bas
Normal file
17
task1/task1-ticket1/_ref/Excel/Examples/usage_cookies.bas
Normal file
@@ -0,0 +1,17 @@
|
||||
Attribute VB_Name = "usage_cookies"
|
||||
|
||||
Private Assert As New Selenium.Assert
|
||||
|
||||
|
||||
Private Sub Handle_Cookies()
|
||||
Dim driver As New ChromeDriver
|
||||
driver.Get "http://admin:admin@the-internet.herokuapp.com/download_secure"
|
||||
|
||||
'Get a cookie by name
|
||||
Dim cookie As cookie
|
||||
Set cookie = driver.Manage.FindCookieByName("rack.session")
|
||||
Assert.Equals "the-internet.herokuapp.com", cookie.Domain
|
||||
|
||||
'Stop the browser
|
||||
driver.Quit
|
||||
End Sub
|
Reference in New Issue
Block a user