Unable to get my Keyword to work

Hi There,
I am attempting to create a Keyword that will run a script that changes the Display to “Block” for all Elements that share the same class. I am pretty sure I have the script correct. But I am getting the following message after I save the Keyword.

Error on keyword.png

You miss packaging Javascript snippet . Should be something like this:


def executeJavaScript()
 ((JavascriptExecutor) DriverFactory.getWebDriver()).executeScript('document.querySelectorAll(".pcrselect").forEach(a => a.style.display = "block"')