How to automate clearing the browser cache in Katalon Recorder

I have a test where I’m changing the permissions in a website and refreshing the page so the changes apply. But when I try to do that in my test case, the page will refresh but the changes won’t apply. Is there a way to somehow clean the browser cache so the changes will apply properly when I refresh the page?

In the screenshot, I tried a few different methods but none of them worked.

1 Like

Hi there, and thanks for posting in the Katalon community! :hugs:

To help you faster, please review our guide on Katalon Recorder here: Katalon Recorder overview | Katalon Docs. Double-checking the steps and configurations might resolve the issue.

If the doc doesn’t help, feel free to provide more details, and a community member will assist you soon. Thanks for being a part of our community!

Best,
Albert Le

are you verifying the element before and after refresh with same object?

Katalon Recorder itself doesn’t have a built-in command to start the browser in incognito. The standard commands like ‘open’ just navigate to a URL but don’t control the browser’s startup parameters. However, when you run tests through Selenium WebDriver, you can set browser options. But Katalon Recorder might not expose that directly.

If the user is using Katalon Recorder’s Selenium WebDriver playback feature (like exporting the test to a language and then running it with WebDriver), then they could modify the code to include incognito mode. For example, in ChromeOptions, you can add --incognito as an argument.

it’s not possible directly within Katalon Recorder’s interface, but if user export the test and use WebDriver, they can configure the browser options to start in incognito. Alternatively, if they manually open an incognito window and then run the test within that window, it might work, but that’s a manual step

no direct command in Katalon Recorder, possible workaround via WebDriver when exporting tests, or manual execution in an incognito window.

Katalon Recorder (a browser extension for Selenium test automation) does not natively support launching a browser in incognito/private mode directly via its built-in commands. However, there are workarounds depending on your setup:

1. Manually Start an Incognito Browser First

  • Open a new incognito/private window manually.
  • Use Katalon Recorder within this window to record/play tests.
  • Limitation: This requires manual intervention and won’t work for fully automated workflows.

2. Export Tests & Use WebDriver with Incognito Options

If you export your Katalon Recorder tests to a language like Python/Java/C# and run them via Selenium WebDriver, you can configure browser options to launch in incognito mode:

  • Example for Chrome (Python):

python

from selenium import webdriver

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--incognito")
driver = webdriver.Chrome(options=chrome_options)
driver.get("https://your-url.com")
  • Example for Firefox (Private Mode):

python

firefox_options = webdriver.FirefoxOptions()
firefox_options.add_argument("-private")
driver = webdriver.Firefox(options=firefox_options)

3. Use Katalon Studio (Advanced Alternative)

If you need more control over browser configurations (e.g., incognito mode), consider switching to Katalon Studio (a full-fledged automation tool). It allows direct configuration of browser profiles and arguments:

groovy

// Example in Katalon Studio
ChromeOptions options = new ChromeOptions()
options.addArguments("--incognito")
WebUI.openBrowser("https://your-url.com", ["browserName": "chrome", "arguments": options])

Why No Direct Support?

Katalon Recorder operates as a browser extension and inherits the current browser session’s state (including incognito mode). It doesn’t control browser startup arguments programmatically unless integrated with WebDriver.

Yes. I actually only wanted to have one of them, not both. The two are just there until I figure out how to get the changes to the web app to apply properly after a refresh.

I tried opening Katalon Recorder in an incognito browser instead and that worked. Thanks for the suggestion.

Edit: Nevermind. It worked for a bit, then the issue came back

can you share in details the steps, error trace, html of your page etc

I’m sorry, but because of security reasons, I can’t share those details :sweat:

Thanks for the help anyways

Can you try using the browsers guest mode and then check

Hi, sorry for the super late reply. I’ve already found a workaround for this issue, so I’ll not be looking at this any more. Thank you for the help though :slightly_smiling_face:.