How to retrieve cookie information from the response?

In Katalon, I am to pull on the Body, Header or Verification log info from the response. However, I need cookie information in order to set the session info for the subsequent calls. In postman, you would be able to see one more tag called “Cookie” that has all cookie information. Please let me know how to retrieve the same in Katalon.

hello, after successfull action (login/whatever) that sets cookie you can use getCookies() of driver:

import org.openqa.selenium.Cookieimport org.openqa.selenium.WebDriverimport com.kms.katalon.core.webui.driver.DriverFactoryCookie ck = new Cookie("name", "value");WebDriver driver = DriverFactory.getWebDriver()driver.manage().getCookies()driver.manage().addCookie(ck)

1 Like