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.
Upload a file
Hi,
I cant upload a file. i il tel u my scripts. I jus tried with our demo example. but its not working for IE.
My script:
if (_isIE()){
_call(_file("BrowseFile").outerHTML = _file("BrowseFile").outerHTML.replace(/type=file/, "type=text"));
}else{
_call(_file("BrowseFile").type = "text");
}
_setValue(_textbox("BrowseFile"), "C:\Documents and Settings\Arun.B\sahi_pro\userdata\New.txt");
Pls provide me a solution
I cant upload a file. i il tel u my scripts. I jus tried with our demo example. but its not working for IE.
My script:
if (_isIE()){
_call(_file("BrowseFile").outerHTML = _file("BrowseFile").outerHTML.replace(/type=file/, "type=text"));
}else{
_call(_file("BrowseFile").type = "text");
}
_setValue(_textbox("BrowseFile"), "C:\Documents and Settings\Arun.B\sahi_pro\userdata\New.txt");
Pls provide me a solution
Comments
Your script should be:
Check if this solves your issue.
Regards
Sumitra
Its nt wrkg ya...
the error msg is,
_setFile(_file("BrowseFile"), "C:\\Documents and Settings\\Arun.B\\sahi_pro\\userdata\\New.txt"); SyntaxError: Expected hexadecimal digit No trace available Click for browser script at FileAttachment (scripts/InitiateTransaction.sah:30) [13219 ms]
Thnx
Try the following code:
Also, could you try running the setFile.sah script by navigating to <sahi-home>/userdata/scripts/demo/setFile.sah and check if you are facing any problem.
Regards
Sumitra
its wrkng fine. u ppl r dn great job.
Can u pls explain the logic behind this.
Thnx.