How do I log on to a web site that uses cookies (I did look at the previous post on this)

I created a test for accessing a website, by recording my actions. When I run the test, I get a page that mentions:
Cookies are required to access this site.

What do I need to change? Here’s the code:

import org.openqa.selenium.Cookie
import org.openqa.selenium.WebDriver
import com.kms.katalon.core.webui.driver.DriverFactory
import com.kms.katalon.core.webui.driver.WebUIDriverType

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys

WebUI.openBrowser(‘’)

WebUI.navigateToUrl(‘https://somewebsite.com/ws?id=245&sessionChecked=true’)

Cookie ck = new Cookie(“name”, “value”);
WebDriver driver = DriverFactory.getWebDriver()
driver.manage().addCookie(ck)

WebUI.setText(findTestObject(‘Page_1 Online/input_requiredtxtUserName’), ‘xxx@gmail.com’)

WebUI.setText(findTestObject(‘Page_1 Online/input_requiredtxtPassword’), ‘yyy’)

WebUI.click(findTestObject(‘Page_1 Online/input_btnLogin’))
:
:

[I looked at http://forum.katalon.com/discussion/4607/how-can-i-set-cookies-for-my-browsers-in-katalon\]

I’m sure others have figured this out. It would be good to document it or have a video on this.