The agent-browser cookies set command only allows setting cookies for the currently loaded URL.
It would be nice to be able to set a cookie for a URL before opening the page, for example to set a session cookie for authentication. The daemon side seems like it would support this, just not the CLI.
I was running into this:
- Open app URL
- App redirects to authentication site
- It's a different domain -> can't use
agent-browser cookies set to set a session cookie on the app URL
Workaround:
- Open invalid URL on the app domain
- Set session cookie
- Open real app URL