I require help regarding the usage of Inject JS activity.
I try to send an alert to the browser, my ScriptCode is: “alert(‘ahahah’)” and I have the following error message:
main has thrown an exception
Message: TypeError: Objet attendu
Source: Inject js script ‘test’
Exception Type: ElementOperationException
UiPath.Core.ElementOperationException: TypeError: Objet attendu —> System.Runtime.InteropServices.COMException: TypeError: Objet attendu
at UiPath.UiNodeClass.InjectAndRunJS(String bstrCode, String bstrInputText)
at UiPath.Core.UiElement.InjectAndRunJS(String code, String input)
— End of inner exception stack trace —
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
Could you explain me the problem and how to fix it?
Thank you.