BluePrism中Navigate组件调用Invoke Javascript function时报错解决方法

BluePrism中Navigate组件调用Invoke Javascript function时报错

Internal : Failed to perform step 1 in Navigate Stage 'Invoke JavaScript' on page 'Action 1' - Failed while invoking javascript method:异常来自 HRESULT:0x80020101->   在 mshtml.HTMLWindow2Class.IHTMLWindow2_execScript(String code, String language)
   在 BluePrism.ApplicationManager.HTML.clsHTMLDocument.InvokeJavascriptMethod(String methodname, String jsonargs, Object& retval, String& sErr)

截图:

BluePrism中Navigate组件调用Invoke Javascript function时报错解决方法_第1张图片

原因是因为输入参数(Arguments)的格式为Json格式,如果为空则输入"[{}]"

如果有参数则按照json格式输入,例如

将要注入的JS方法是

function sayHello(name) { alert("Hello " + name.name + "!"); }

则输入参数(Arguments)为"[{'name':'world'}]".

 

你可能感兴趣的:(RPA,js,mshtml,BluePrism)