Webdriver Access

As pre and post actions for the script such as java code for clean up browser cookies, would like to know how to access the webdriver directly in Katalon and execute the java code for clean up.