Andy Zhang
Katalon Apprentice
01/10/2018
edited January 10

How can I set cookies for my browsers in Katalon?

As the title says

Thanks for help.
Upvote
Quote

Comments

  • Ana Hong
    Katalon Apprentice
    01/10/2018
    It is quite easy:

    import org.openqa.selenium.Cookie
    import org.openqa.selenium.WebDriver
    import com.kms.katalon.core.webui.driver.DriverFactory
    Cookie ck = new Cookie("name", "value");
    WebDriver driver = DriverFactory.getWebDriver()
    driver.manage().addCookie(ck)
    Upvote
    Quote
  • Andy Zhang
    Katalon Apprentice
    01/10/2018

    @Ana Hong said:
    It is quite easy:

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

    Thank you

    Upvote
    Quote
Sign In or Register to comment.