How to use the "refreshAndWait" command in Katalon Recorder?

I couldn’t any info about this in the documentation. I just want to know if there is anything I need to add to the “Target” and “Value” column

image

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

The refreshAndWait command in Katalon Recorder (or Selenium IDE-based tools) is used to refresh/reload the current page and wait for it to fully reload before proceeding to the next command. Here’s how to use it:

Usage:

  1. Command: refreshAndWait
  2. Target: Leave empty (no input needed).
  3. Value: Leave empty (no input needed).

Explanation:

  • This command does not require a target or value since it acts on the entire page.
  • It mimics manually clicking the browser’s refresh button and ensures subsequent commands wait until the page finishes reloading.

Example Test Case:

Command Target Value
open /login
type id=user admin
refreshAndWait
verifyText css=h1 Welcome

Notes:

  • Use refreshAndWait instead of refresh if your test depends on elements that load after a refresh (to avoid race conditions).
  • If you see errors after refreshing, ensure elements are stable post-refresh (e.g., add waitForElementPresent if needed).
2 Likes

I see, thanks for the help.

1 Like