Blocking problem : Upload *.jpg file fails


I am using Katalon 8.0.5 and trying to upload jpg file via the following command line:
WebUI.uploadFile(findTestObject(‘Object Repository/SpyElements/2_Critères_de_recherche/9_Upload_ID/div_Recto’), ‘C:\Users\username\Desktop\ID\recto.jpg’)

And I got the attached error:

Could someone help me to solve this problem?
Should I make some prior configurations before using this command line?

Thank you in advance for your help :slight_smile:

Please give this solution a try:

Thank you very much for your answe @brandon.hein It’s seemes to be ok (i don’t have the previous error) but now I have another error, Katalon is enable to locate the object:

Unable to find the element located by ‘By.xpath: //input[@id=’/html[@class=‘ks-webkit537 ks-webkit ks-chrome92 ks-chrome’]/body/div[@id=‘root’]/form/div[@class=‘App’]/div[@class=‘Content’]/div[@class=‘sc-kHlotv hgKpxV IdentityDocumentScreen’]/div[@class=‘sc-bybRYC eHREYu’]/div[@class=‘sc-iihChq iPmKbR’][1]/label[@class=‘sc-cqktmv hHoqOB’]’]’. Please recheck the objects properties to make sure the desired element is located.

I also tried using Object Spy but I got the same error.

Do you please have an idea about how resolving this problem?

I would need to see the HTML for the field you are trying to locate to give you a solution.

Thank you for your reactivity :slight_smile: Please find it below and attached the info concerning my object:

String path1 = “C:\Users\myUserName\Desktop\ID\recto.jpg”

WebUI.sendKeys(findTestObject(‘Object Repository/SpyElements/2_Critères_de_recherche/9_Upload_ID/input_ID_Recto’), path1)

The xpath in your test object should be:


notice that we are targeting the @data-testid attribute, and not the @id attribute as you have in your current xpath.

1 Like

Yeeeess!! Thank you very much!! It’s finally working :smiley: :muscle:

Great :slight_smile: Please consider marking an answer to this topic for others to reference.

1 Like

I have marked the appropriate solution to this post. Cheers :slight_smile:

1 Like