SelniumBasic.Cookieオブジェクト構造
Cookieを扱うオブジェクトはManageの中にあります。
![](https://lil.la/wp-content/uploads/image-780.png)
CookiesはCookieの単一コレクション
![](https://lil.la/wp-content/uploads/image-782.png)
Cookieのメゾッドやプロパティ
![](https://lil.la/wp-content/uploads/image-779.png)
サンプルコード
VBA
Dim driver As New ChromeDriver
Dim Cookie As Cookie
With driver
.Get "https://www.yahoo.co.jp/"
For Each Cookie In driver.Manage.Cookies
Debug.Print "Name", Cookie.Name
Debug.Print "Path", Cookie.Path
Debug.Print "セキュリティ", Cookie.Secure
Debug.Print "有効期限", Cookie.Expiry
Debug.Print "Value", Cookie.Value
Debug.Print "Domain", Cookie.Domain
Debug.Print String$(100, "=")
Next
End With
実行結果
![](https://lil.la/wp-content/uploads/image-781.png)
コメント