In my script I have the following code that works fine when running the test:
import org.openqa.selenium.Cookie as Cookie
import org.openqa.selenium.WebDriver as WebDriver
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory
WebUI.openBrowser(‘http://somepage.com’)
Cookie ck = new Cookie(‘name’, ‘value’)
WebDriver driver = DriverFactory.getWebDriver()
driver.manage().addCookie(ck)
Error when I click the play button in ‘Record Web’:
START Verification
2018-11-28 10:44:05.863 ERROR c.k.k.core.main.WSVerificationExecutor - Verification FAILED.
Reason:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WSVerification1543419845701: 27: unable to resolve class Cookie
WSVerification1543419888935: 29: unable to resolve class WebDriver
Katalon Studio
Version: 5.9.0
Build: 1