Selector not working in gmail

The following works in Chrome DevTools to get the To: Email address but is not working in my KM Macro. It says $ is not defined in the console when I “try” it.
$(’.ik’).textContent

Any idea what I’m doing wrong?

What action are you using? Execute JavaScript in Google Chrome?

Try the same matching action in Safari if possible.

Sometimes the Chrome actions break due, I believe, to their dodgy AppleScript support and auto-updating mechanism. So check whether any of the Google Chrome actions work.