Inject JS Script not recognising the javascript function existing in the downloaded script files

Hi All, Please look at the below code that i am using in injectjs activity file

("a").each(function () { addUrlToName((this));
});

“addUrlToname” exists in one of the scripts file thats loaded with the web page. Dont know why its not working, may be the injectjs script is running before all the scripts are loaded.

@suneel.bhasker
A first look on the screenshot let me think following. The target is not fully configured

So maybe the Javascript is injected into a black hole.

I would suggest to configure a selector or element on which you want to inject (e.g. entire Page or particular HTML element)

The js inject Activity is on the first try less easy to get it working. For exploring to do simple RnD/Tests with simple javascript (e.g. let pop up an alert) helps much for doing the start.

Still not working, i changed the selector to the following which i think targets the whole page:

webctrl tag=‘HTML’

Gives the same error. The script works fine if i add any other javascript commands. It only is not able to call the function from the other script files that comes with the web page.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.