How to set upload file path in Android device (Samsung S3)

Hi supporters,

I am in trouble with upload file in mobile device. I can’t not set file path like /storage/emulated/0/DCIM/Carema/File1.jpg

When I ran a test in mobile, an error said “File path not found”

Please help me out of here. I am using the latest version 5.4.1

Thanks,

Please post your test script in this case

Thanks Vinh for supporting me,

Here the script that I am using for uploading document

WebUI.waitForElementClickable(findTestObject(‘Empower/LodgeANewClaim/buttonAddClaimForm’), 0)

WebUI.click(findTestObject(‘Empower/LodgeANewClaim/buttonAddClaimForm’))

WebUI.uploadFile(findTestObject(‘Empower/LodgeANewClaim/UploadDoc_Files’), GlobalVariable.upload_file1)

The code above is working in window but it isn’t working in mobile device
The GlobalVariable.upload_file1 is /storage/emulated/0/DCIM/Carema/File1.jpg the correct in my phone.

Hi Thai,

‘Upload File’ keyword is not supported when you are executing a mobile test script, it’s supposed to be used for web testing only, so you can’t use that and it can’t access your mobile’s file.

Thanks Vinh so much,

I know the limitation now. Could you please tell me is there any way to do upload file for web application in mobile device

Just for clarification: You are using Web UI keywords on a mobile device , in short, what I mean is mobile browser, is that correct?

Hi Vinh,
Yes I am using Web UI keywords for a test script and I am using it for testing on both of window and mobile device.

For testing it in mobile, I am using Chrome browser in my mobile device

Thai said:

Hi Vinh,
Yes I am using Web UI keywords for a test script and I am using it for testing on both of window and mobile device.

For testing it in mobile, I am using Chrome browser in my mobile device

Hi Thai,

Unfortunately, ‘Upload File’ keyword can only access a file from a local machine, so it will not understand device’s path in case you try to upload it from your mobile device