Loadrunner Ajax Trueclient + set filepath to filebox
I recorded one fileupload scenario and it was recorded as set <path> to <fileUpload> filebox. Now when replaying the script, it works fine in FireFox but it hang for long time in Chrome and ultimately I need to clode the script. It does not show any failure. Can anyone help?
I did not find any alternate to "set" method and I tried evaluate JS for upload file with below code and that also working in FireFox but not in Chrome. I read lot of forum and I found that value property for file input element could not be set due to security issue. Not sure why it is working in FF and also not sure how "set" method breaches the security. Can anyone give some solutions?
var iframe = document.getElementById("docUploadFrame");
var innerDoc = iframe.contentDocument || iframe.contentWindow.document;
var test = innerDoc.getElementById("fileToUpload");
test.value = "D:\\OA\\PI3\\Docs\\Editable 1008 - Approve.pdf"