我正在寻找一种方法来保存chrome会话cookie,即使我的程序关闭后仍然存在.我假设写一个文件是一个很好的方法来做这个,但我不知道如何实现这一目标.我的最终目标是保存登录cookie,这样用户就不必每次都进行登录.这是一些代码:
Dim driver = New Chrome.ChromeDriver()
driver.Navigate.GoToUrl("URL")
'click stuff and login here
Dim _cookies = driver.Manage().Cookies.AllCookies
'write cookies to file or save somehow
Run Code Online (Sandbox Code Playgroud)