How to run javascript onclick in a webpage with studio?

I want to run onclick method in a webpage. Maybe, I have to use Inject Js Script acticity but I dont know how to use. Could you help me?

put this code in a text file, then use inject js activity and reference that text file

function (e) {
redirectToEdit(1226732,"search");    	
}

image

Thank you for your answer, but I have a problem . this function is on the page. but why not found error. image

did you select the correct page in the inject js activity?

Yes I did.

The error states the signature of your function is (String, String).
But you are passing a number, string.

Could that be the problem?