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.
_setFile not works
SOS_setFile not works
_setFile(_file("file1"), "C:/notify.pdf");
_click(_link("import"));
nothing is output to sahi console
the script is normally executed,
struts action :
i modified the FileUpload.java
in sahi console
info: setFile(final HttpRequest request) in .....
appendFiles() is not executed, why........
Sahi V3 Release 2010-06-11
IE 8 XP
Struts 1.X
I also tried sahi_20100430
_setFile(_file("file1"), "C:/notify.pdf");
_click(_link("import"));
nothing is output to sahi console
the script is normally executed,
struts action :
protected String process(ActionMapping mapping,ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
FormFile fileUp = (FormFile) form.get("file1");
//fileUp.getFileSize() is 0
//fileUp.getFileName() is ""
}
i modified the FileUpload.java
public class FileUpload {
private static Logger logger = Configuration.getLogger("net.sf.sahi.command.FileUpload");
@SuppressWarnings("unchecked")
public HttpResponse setFile(final HttpRequest request) {
logger.info("setFile(final HttpRequest request) in .....");
...................
}
@SuppressWarnings("unchecked")
public HttpResponse appendFiles(final HttpRequest request) {
logger.info("appendFiles(final HttpRequest request) in .....");
......................
}
}
in sahi console
info: setFile(final HttpRequest request) in .....
appendFiles() is not executed, why........
Sahi V3 Release 2010-06-11
IE 8 XP
Struts 1.X
I also tried sahi_20100430
This discussion has been closed.
Comments
SOS
Hi beesman,
Can you check if the action (of the form being submitted) changes on clicking import?
Regards,
Narayan
i solved the problem, please close this post.
Thank you all the same.