I would like to ask if there is an “add” cookie solution available. If I start the webdriver again it would be awesome if the cookies of the last session would be still available (e. g. save them and use them again in another webdriver session).
currently this is not possible (at least via the Cookies node), but:
- It would be a nice-to-have, so we will consider to add this in a future update.
- You can currently use a Java Snippet node to access the Selenium cookies API directly, to set cookies. E.g.:
webDriver.manage().addCookie(new Cookie("key", "value"));
- Another option (as you’re talking specifically about keeping a session): Persist the browser’s user profile across relaunches. See here for details.
Does any of these help?
Thank you for your fast response and the two solutions. Yes, the first approach works for me.
The only thing is that the cookie is not implemented during the starting process of the webdriver.