While trying to run script for image upload or file upload, I get following play back error in SAHI open source.
What could be done to prevent this error?
Script goes like:
_click(_link("プロフィール"));
_assertExists(_file("profile-fileupload"));
_assert(_isVisible(_file("profile-fileupload")));
_assertEqual("", _getValue(_file("profile-fileupload")));
_setFile2(_file("profile-fileupload"), "C:\\fakepath\\IMG_69546123046766.jpeg");
You can't record a file upload. Sahi just provided a dummy path for file upload. If you look at this:
_setFile2(_file("profile-fileupload"), "C:\\fakepath\\IMG_69546123046766.jpeg");
This is using fakepath. Enter the actual filesystem path of your file and it will be uploaded.