Inject Js Script Error

I want to get the number of menus of a specific site, then loop around the number of menus and click the menu.

However, the following error occurs.
Inject Js Script: TypeError: _clientFunc is not a function

Can you help me?

injectJs.zip (12.3 KB)