How to invoke javascript from Invoke code activity..?


#1

hi,
I have used inject js script to inject javascript in browser…
Can anyone share a sample xaml of how to invoke javascript code from invoke code activity…?


#2

try this

injectjs - Uipath.Core.Activities.InjectJsScript
wfInvoke  - System.Activities.WorkflowInvoker;

injectjs= new Uipath.Core.Activities.InjectJsScript;
injectjs.Target.Selector = "your selector";
injectJS.ScriptCode = "yourjs.js"; -- path
injectJS.InputParameter = " "; // if any
injectJS.Target.WaitForReady = WaitForReady.COMPLETE;
wfInvoke = new WorkflowInvoker(injectJS)
wfInvoke.Invoke()