I have a webpage on which I want to add jQuery lib, here is the code :
var script = document.createElement('script');
script.src ="https://code.jquery.com/jquery-1.11.3.min.js";
document.body.appendChild(script);
This code is called from UFT using VBS code :
script= "var script = document.createElement('script');" &_
"script.src =" & chr(34) & "https://code.jquery.com/jquery-1.11.3.min.js" & chr(34) & ";" &_
"document.body.appendChild(script);"
Browser("myBrowser").Page("myPage").RunScript(script)
When I run my VBS code, an error is thrown
"Erreur non spécifiée" | in English "unspecified error"
But i can't figure out why this error is thrown since both VBS and my js code seem OK... I am using IE 8 Enterprise Mode and script is enabled in security options. I have no more ideas on how to work around this issue...
Thanks,
RunScriptFromFileinstead of justRunScript...?