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.

Fake Path

JicmJicm Members
edited November -1 in Sahi - Open Source
Hi there!

I'm trying to test an upload form. When i'm recording everything looks fine, but when i play back the script the upload option doesn't shows up, and it gives an error beacause of the fakepath.

The way i'm testing is with the service running in other computer simulating a server, so i'd like to know if this option has something to doesn't work that way or how it's supposed to be the syntax.

I also tried wit _click(_file("po_form_1")) but this not even shows up the dialog window.

The pc where sahi is running has Ubuntu and the pc where i'm making the test works with WinXP, and the browser i'm using is Chrome


The script
 _setFile(_file("po_form_1"), "");
 _setFile(_file("po_form_1"), "C:\\fakepath\\250px-Nissan_Sentra_SL.jpg");

Comments

  • narayannarayan Administrators
    Hi,

    The path has to be a real path as resolved on the system where the Sahi proxy is running. So your path should resolve correctly to a file path on your Ubuntu system.

    Regards,
    Narayan
  • So with this you mean that the file must be upload first to the server and then locate it inside.

    Well i'll see how this works for the application.

    Thanks.
Sign In or Register to comment.