File upload on browserstack

Hi community,
we are testing our application using Browserstack on different browsers, which works just perfect. But i fonu, i am not able to test file uploads. This works locally great using WebUI.uploadFile for file located in project folders, but when testing on Browserstack, i don’t have project accessible as it is on my local, so the path to the file do not exists.
Is there any way to enable file access for Browserstack so it can upload file from my project on local?

Thank you in advance

How does Browserstack works with Katalon ? Is the project sent over to the cloud and run there ? If yes, you can probably put the file to upload in your project and use relative path.

We have integrated Browserstack as “custom capabilities” and run Katalon tests various ways…locally, crom build script, etc. Anyway Katalon test is run from local and runs in browserstack browser where files from local project is not reachable.

Hi @thubicka,

You can upload your app to Browserstack using our Web Service request.


Hi, how do you mean that?

I also found way to work with local files on SM…described here but have no idea if it is possible to integrate to katalon project.

Hi @duyluong,

the media file was submitted to Browserstack by this command:

curl -u "username:key" -X POST "" -F "file=@c:\path\to\file\picture.jpg" -F 'data={"custom_id": "picture.jpg"}'

Something has really arrived to BS (recent_media_files) :
{“media_name”:“picture.jpg”,“media_url”:“media://…”,“media_id”:"…",“uploaded_at”:“2019-12-06 12:34:44 UTC”}

The test that has to use the picture fails with:

uploadFile(findTestObject(".../input_file_upload"), filePath)
Unable to upload file 'picture.jpg'

Could you please help me to make the upload successful?

Best regards.