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.
File Upload
I'm attempting to create a test that uploads a .txt file into our system but I am running into some trouble. I've searched the forums and site for a way around our blank field check and so far I've run into the following scripts, neither of which has worked:
Which brings back the error: Proxy_Fwd: appended_strings = NULL and nothing is uploaded.
I have also used:
which I found on the forums, although this causes our uploading process to hang and require a restart before it can be utilized again.
If anyone can help me I'd greatly appreciate it.
_setFile(_file("file1"), "scripts\tryharder\goodoffers.txt");
if (_isIE()){
_call(_file("file1").outerHTML = _file("file1").outerHTML.replace(/type=file/, "type=text"));
}else{
_call(_file("file1").type = "text");
}
_setValue(_textbox("file1"), "scripts\\tryharder\\goodoffers.txt");
Which brings back the error: Proxy_Fwd: appended_strings = NULL and nothing is uploaded.
I have also used:
_call(_file("file1").outerHTML = '<input name="goodoffers" type="text" id="goodoffers" size="17.3" value=\"scripts/tryharder/goodoffers.txt\" />');
which I found on the forums, although this causes our uploading process to hang and require a restart before it can be utilized again.
If anyone can help me I'd greatly appreciate it.
Comments
Try with the following script,
It seems like path is incorrect.
Hope this might help you.
Regards,
Theeran.
I fixed the file path and now I keep getting a failure.
When looking at the log I saw highlighted in red the folowing:
seems to be missing a quote
_setFile(_file("file1"), "C:\\Users\\User\\sahi\\userdata\\scripts\\tryharder\\goodoffers.txt");
Also the sahi console says the following
And I know the file is at that path.
WARNING: net.sf.sahi.util.FileNotFoundRuntimeException: java.io.FileNotFoundExce
ption: C:\Users\Ussr\sahi\userdata\scripts\tryharder\goodoffers.txt (The system
cannot find the path specified)
The file path is incorrect.
Regards,
Narayan