Error with on extension scripts: `LocatorBuilders is not defined`

Hey there :upside_down_face:

Testing Katalon Recorder to see if it fits our necessities; wanted to add an extension script but I receive this error on console:

My stack:

  • MBP M1 (2021)
  • Chrome 96.0.4664.110 (arm64)
  • Katalon recorder 5.9.0

The script is similar to:

LocatorBuilders.add('Random selector', function (e) {
  if (e.className.includes('random')) {
    const maxiClasses = Array.from(e.classList).filter(c => c.includes('random'));

    return `css=${maxiClasses.join('.')}`;

  return null;

Thanks in advance :+1:

@jj1, did you restart Katalon Recorder and refresh the web page you are working on? You would need to refresh the tab to have the new extension script working. You can check this doc on using extension script.

Thanks @chen.lee for your answer.

I’ve tried different ways to restart: first I made a refresh of the tab, then I ran chrome://restart and after test it didn’t work, I restarted the whole computer, and nothing; I keep having the same issue :+1: