18 January 2026:


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.

error "$userFile" is not defined

robyrobotrobyrobot Members
edited November -1 in Sahi - Open Source
Hi All,

I got the following exception in a test that try to upload a xls file:

Logging exception: "$userFile" is not defined. at 16-lug-2009 10.59.05


my code fragment is:

_setFile(_file("pmc_196\$_ts_id\$ultraWebTab1\$_ctl4\$_uic_id\$FileLogo"), "c:/file.xls");
_click(_submit("Importa"));


I tried with c:\\file.xls too, but no results


in sahi console I got:
url: <my application url>
command: FileUpload_appendFiles

but no info about the uploaded file

Any ideas ?

Cheers

Roby

Comments

  • narayannarayan Administrators
    Where is this $userFile coming from? $userFile is not used in Sahi's code, so it must be in the script.

    There was a bug in file upload where a header was incorrectly added. An unstable release was made yesterday which has a fix for it. (Look in "All files" on the sourceforge website. My internet is a bit flaky right now so unable to get the link.)

    First figure out where $userFile is, eliminate that error and then check with the new build.

    Regards,
    Narayan
  • narayan wrote:
    Where is this $userFile coming from? $userFile is not used in Sahi's code, so it must be in the script.

    There was a bug in file upload where a header was incorrectly added. An unstable release was made yesterday which has a fix for it. (Look in "All files" on the sourceforge website. My internet is a bit flaky right now so unable to get the link.)

    First figure out where $userFile is, eliminate that error and then check with the new build.

    Regards,
    Narayan

    Ok ... sorry it's my error :-(

    $userFile is a variable in the rest of the code ...
    in the log no exception nor javascript errors ...

    the problem is that the file will not be uploaded ..

    i will try the unstable code and will reports any news

    thanks ^_^

    Roby
  • Ok the unstable version works fine for file upload ^_^
    thanks narayan for the quick reply

    Cheers

    Roby
  • narayannarayan Administrators
    Great! May be I should post about the new unstable build.

    Cheers,
    Narayan
This discussion has been closed.