Inject JS activity pro

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.

Hello @alice

What Browser you are using ? IE?

please use Google Chrome and let me know.

Currently with this activity facing this error problem with IE but in chrome it works.


1 Like

Thank so much! I spent hours on that, I should have ask before!