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 issue
Hi, sumitra
As per our discussion, i followed your updated script but controller shows error then as per your ctrl+Hover here i am giving you the details.
here i am ctrl +Hover on the text lebel: Document File, the Accessor field displys
1._span("Document File *") ,
2.same in the alternatives and
3. Document File* in value .
and if i hold in the same way on the input textbox then accessor shows
1._file("fileUploadInvoiceFile")
Regards,
Please waiting for reply
kapil
As per our discussion, i followed your updated script but controller shows error then as per your ctrl+Hover here i am giving you the details.
here i am ctrl +Hover on the text lebel: Document File, the Accessor field displys
1._span("Document File *") ,
2.same in the alternatives and
3. Document File* in value .
and if i hold in the same way on the input textbox then accessor shows
1._file("fileUploadInvoiceFile")
Regards,
Please waiting for reply
kapil
Comments
Kindly use :
_setFile(_file("fileUploadInvoiceFile"),"C:\\test.txt"); instead of
_setFile(_file("file"),"C:\\test.txt");
Regards
Sumitra
while playbach, today apllcation shows Select and cancel button. insted of dropdown...
this problem occures in reguler interval... why?
what is the reason ? and only because of that i am not able to proceed further ?
what is the permnt solution for this?
regards'
kapil
Kindly check if your application is under development.
Regards
Sumitra
i have implimented your recent suggestion also but cant get rid of error message.
here i am posting the complete script again for your reference' with error message.
_click(_cell("Accounts Payable"));
_click(_cell("AP Processor"));
_click(_cell("AP Processor"));
_click(_cell("Enter Invoice"));
_click(_button("dbcPurchaseOrder_ulbSearchButton"));
_setSelected(_select("dbcPurchaseOrder\$ulbDropDown"), "0011806");
_setValue(_textbox("txtInvoiceNumber"), "1960");
_click(_image("Click here to view the calendar"));
_click(_cell("12"));
_click(_cell("12"));
_setValue(_textbox("txtInvoiceAmount"), "100");
_click(_image("Click here to view the calendar[3]"));
_click(_image("Click here to view the calendar[3]"));
_click(_cell("10"));
_click(_cell("10"));
_setValue(_textarea("txtInvoiceDescription"), "kapil");
_click(_submit("Edit"));
_setValue(_textbox("dtgrdTaskDistribution\$ctl02\$txtDistribution"), "100.00");
_click(_submit("Update"));
_click(_submit("Upload New Document"));
_setFile(_file("fileUploadInvoiceFile"),"C:\\test.txt");
// set the file
// Change the "type" attribute of file field
if (_isIE()){
_call(_file("file").outerHTML = _file("file").outerHTML.replace(/type=file/, "type=text"));
}else{
_call(_file("file").type = "text");
}
// Set the value into the textbox
_setValue(_textbox("file"), "C:\\test.txt");
_click(_submit("Save"));
Error message :
_setFile(_file("fileUploadInvoiceFile"),"C:\\test.txt");
TypeError: Unable to get value of the property 'form': object is null or undefined
No trace available
Please help me.....
Regards,
kapil
Could you please let me know what version of Sahi are you using?
Also, let me know which browser are you using.
It will be convenient if you post the URL of your application so that we can try it on our machine and help you with the solution.
Regards
Sumitra
I am using Sahi V 3.5 version. on IE 9 , on windows 7 and i am accessing my application through
VPN. and due to security perpose company will not permit me to disclose any further details regarding
VPN passward etc. so, will you please help me in fixing this file upload issue? because already i have spent 2 weeks , on this issue... and still its unresolved....
please make hurry... otherwise seniors will not allow me to continue with sahi anymore.......
Tell me if u need entire script... for reference....
Regards,
kapil
Thanx for the reply.
Actually I am working on same issue... so anytime till 5.00 PM. today also...
And i am facing another problem that.. while recording form gets completely filled ,but while playback
controller cannot hold that recorded steps and looses filled values due to which validation error occurs
sahi is impressive .and very much useful... please help me out in these issues.. so that i can continue with my testing work...
Regards,
kapil