How to work with cookies
BrowserAutomationStudio has 3 methods, which manipulate cookies: “Save Cookies”, “Restore Cookies”, “Get Cookies For Url”.
“Save Cookies” action saves cookies to variable. Variable gets string with json, like this:
“Restore Cookies” restores cookies from variable which is created with “Save Cookies” action.
To clear cookies, use “Restore Cookies” action with empty value.
Following user case is correct:
- Login to website.
- Save cookies to file.
- Restart browser.
- Restore cookies from file.
- You are logged in!
This video demonstrates that approach:
“Get Cookies For Url” is same as “Save Cookies”, the only difference is that it filers cookies array by given url.