18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Unable to Upload a file in IE( works fine in Chrome)
OS: windows 7
Sahi:V3.5
IE-8
Hi,
We are not able to do upload in our upload pop-up in which multiple files can be uploaded at a time. There are other upload screens where only one file can be uploaded at a time and the solutions available that converting file type to text works. But the same is not working in other screen where multiple uploads is possible.
The outer HTML is : <INPUT class=file onchange="setFileNameFromPath(this.value, document.forms[0].filename);" type=file name=fileIndex1>
The code which does not work is :
_setFile(_file("fileIndex1"), "D://test.txt");
_call(_file("fileIndex1").outerHTML=_file("fileIndex1").outerHTML.replace(/type=file/, "type=text"));
_setValue(_textbox("fileIndex1"),"D://test.txt");
_setFile(_file("fileIndex2"), "D://test.txt");
_call(_file("fileIndex2").outerHTML=_file("fileIndex2").outerHTML.replace(/type=file/, "type=text"));
_setValue(_textbox("fileIndex2"),"D://test.txt");
Sahi:V3.5
IE-8
Hi,
We are not able to do upload in our upload pop-up in which multiple files can be uploaded at a time. There are other upload screens where only one file can be uploaded at a time and the solutions available that converting file type to text works. But the same is not working in other screen where multiple uploads is possible.
The outer HTML is : <INPUT class=file onchange="setFileNameFromPath(this.value, document.forms[0].filename);" type=file name=fileIndex1>
The code which does not work is :
_setFile(_file("fileIndex1"), "D://test.txt");
_call(_file("fileIndex1").outerHTML=_file("fileIndex1").outerHTML.replace(/type=file/, "type=text"));
_setValue(_textbox("fileIndex1"),"D://test.txt");
_setFile(_file("fileIndex2"), "D://test.txt");
_call(_file("fileIndex2").outerHTML=_file("fileIndex2").outerHTML.replace(/type=file/, "type=text"));
_setValue(_textbox("fileIndex2"),"D://test.txt");
Comments
Is there any workaround for the above...
I just noticed that the above issue works fine in other browsers like chrome, Problem is only in IE 8
Is it something related to Onchange event in IE..
Here is the related post to that
http://sahi.co.in/forums/discussion/comment/10961#Comment_10961
I also tried using _focus(_file("file")); but it did not work..
This worked for me in IE10. Sahi OS Version: V4.3
_call(_file("file").outerHTML = _file("file").outerHTML.replace("file", "text"));
_setValue(_textbox("file"),$uploadingfile);
Its nor working for us and its becoming a blocker for entire automation as now the same feature is come in other modules where this is the first step to proceed further.
Can we have a webex session for this?
Please help us.
Regards,
Bhavitha