# File Upload with button in Katalon Studio

**URL:** <https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [October 7, 2021, 2:12pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972 "2021-10-07T14:12:56Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![juan.angeles](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/juan.angeles/32/16104_2.png) [@juan.angeles](https://forum.katalon.com/u/juan.angeles)\
**Post date:** [October 7, 2021, 2:12pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/1 "2021-10-07T14:12:56Z")

</div>

I want to load a file through a button that is contains an icon as an image on top of it. When it runs the test it stops just in the attempt to load as if it had clicked on the object and opens the file browser. It is worth mentioning that I have Katalon installed on Linux. I share my script

The variable “file” was where I introduced the path of the file to load

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint  
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase  
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData  
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject  
import static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject  
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint  
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW  
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile  
import com.kms.katalon.core.model.FailureHandling as FailureHandling  
import com.kms.katalon.core.testcase.TestCase as TestCase  
import com.kms.katalon.core.testdata.TestData as TestData  
import com.kms.katalon.core.testobject.TestObject as TestObject  
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS  
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI  
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows  
import internal.GlobalVariable as GlobalVariable  
import org.openqa.selenium.Keys as Keys

WebUI.openBrowser(‘[https://pru-sedesu.elmarquesdigital.com/sedesu/](https://pru-sedesu.elmarquesdigital.com/sedesu/)’)

WebUI.maximizeWindow(FailureHandling.STOP\_ON\_FAILURE)

WebUI.setText(findTestObject(‘Object Repository/Page\_Inicia sesin en sedesu-pru/input\_Usuario o email\_username’), ‘user-ventanilla’)

WebUI.setText(findTestObject(‘Object Repository/Page\_Inicia sesin en sedesu-pru/input\_Contrasea\_password’), ‘Biaani01’)

WebUI.click(findTestObject(‘Page\_Inicia sesin en sedesu-pru/input\_Has olvidado tu contrasea\_login’))

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/a\_Licencias\_side-nav-toggle’))

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/a\_Licencias\_side-nav-toggle’))

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/i\_Pase de Caja\_bx bx-edit bx-sm bx-fw’))

WebUI.setText(findTestObject(‘Object Repository/Page\_SedesuDigital/input\_Pase de caja\_form-control custom-inpu\_12e579’),  
pase\_caja)

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/button\_Buscar’))

WebUI.setText(findTestObject(‘Page\_SedesuDigital/input\_nombre\_trmite’), ‘FUSIÓN DE PREDIOS’)

WebUI.sendKeys(findTestObject(‘Page\_SedesuDigital/input\_nombre\_trmite’), Keys.chord(Keys.ENTER))

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/label\_Acepto el aviso de privacidad’))

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/button\_Comenzar registro’))

WebUI.setText(findTestObject(‘Object Repository/Page\_SedesuDigital/input\_\_form-control custom-input-form ng-un\_5b4895’),  
‘juan.angeles@biaani.com’)

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/button\_Continuar’))

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/div\_Adjuntar trmite llenado a mano’))

WebUI.uploadFile(findTestObject(‘Page\_SedesuDigital/button\_carga\_1’), file)

WebUI.delay(10)

WebUI.doubleClick(findTestObject(‘Object Repository/Page\_SedesuDigital/div\_FUSIN DE PREDIOS DOCUMENTOS DIGITALIZAD\_01389b’))

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/div\_notificar’))

WebUI.closeBrowser()

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/0/c/0c555506208f1e5ae6ca7ad031d8dadf2ff1d21c.png)

These are the buttons I refer to where I want to load the file

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/e/6/e6b04743fe762df40be7183655044a22cb1d9b4e.png)

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/e/1/e156a0f562d387e65c6b40fdbe5b6d2a881b21dd.png)

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/7/a/7a3a11b2285ed3c9c0a1c52a18c18b519b95bc2a.png)

The result of the test shows that the file is being sent but when I run the test it stops showing the linux file browser and does not load the file in the application.

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [October 7, 2021, 2:21pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/2 "2021-10-07T14:21:44Z")

</div>

Please don’t be offended, but what you just did was take a photo of your car, drew a red box around the hood, took it to a mechanic and said, “it’s making a weird noise somewhere in there”.

We need to see under the hood!

> [@\[TIP\] How To Help Us Help You!](http://forum.katalon.com/t/tip-how-to-help-us-help-you-my-test-is-broken-nothing-works-updated-nov-2019/12919):
>
> My test is BROKEN! NOTHING WORKS! HELP ME! Relax. We get it. We really do. There are some pretty smart and clever people on this forum, but you must realize, they are not magicians or wizards or gods. They cannot see your code, they can’t see your errors and they don’t even know what your AUT is meant to do even though it might seem perfectly obvious to you. So please relax and follow the advice below, before you start writing your post. The advice below will tell you the exact information …

---

<div class="post-metadata">

**Author:** ![juan.angeles](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/juan.angeles/32/16104_2.png) [@juan.angeles](https://forum.katalon.com/u/juan.angeles)\
**Post date:** [October 7, 2021, 2:35pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/3 "2021-10-07T14:35:08Z")

</div>

I’m not offended but attach the code above. What do I need to attach more?

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [October 7, 2021, 3:28pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/4 "2021-10-07T15:28:06Z")

</div>

You say the variable “file” is where you introduce the path of the file, but I don’t see it, such as:

`file = "G:\\Katalon Studio\\Data\\MyFile.txt"`

Do you do it somewhere else not in the code? (Perhaps do a test and put the definition of “file” in the code to see what happens?)

---

<div class="post-metadata">

**Author:** ![juan.angeles](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/juan.angeles/32/16104_2.png) [@juan.angeles](https://forum.katalon.com/u/juan.angeles)\
**Post date:** [October 7, 2021, 3:40pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/5 "2021-10-07T15:40:18Z")

</div>

![image](https://europe1.discourse-cdn.com/katalon/original/3X/e/1/e156a0f562d387e65c6b40fdbe5b6d2a881b21dd.png)

I defined it within the test case

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [October 7, 2021, 3:47pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/6 "2021-10-07T15:47:17Z")

</div>

Can you do a test and copy the file’s path that you have and use some type of file explorer (not sure what it’s called in Linux) and see if it actually makes it to your file’s location? If it doesn’t make it to the actual file’s location, change the pathway so it does. In my example, (I’m on Windows) I have the full pathway including directory etc.

And, you may try to have double slashes in your file pathway, as well, like I have above.

---

<div class="post-metadata">

**Author:** ![juan.angeles](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/juan.angeles/32/16104_2.png) [@juan.angeles](https://forum.katalon.com/u/juan.angeles)\
**Post date:** [October 7, 2021, 3:50pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/7 "2021-10-07T15:50:37Z")

</div>

If the path I am configuring is within a Linux file directory. When I run the test it stops right when it tries to do the file upload and opens the file explorer right at the path I configured but does not do the upload action. In the results it marks me that if it sends the file to the object but it is not reflected when it runs the test.

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/7/a/7a3a11b2285ed3c9c0a1c52a18c18b519b95bc2a.png)

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [October 7, 2021, 3:52pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/8 "2021-10-07T15:52:33Z")

</div>

Maybe try:

> [@grylion54](#):
>
> You may try to have double slashes in your file pathway, as well.

---

<div class="post-metadata">

**Author:** ![juan.angeles](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/juan.angeles/32/16104_2.png) [@juan.angeles](https://forum.katalon.com/u/juan.angeles)\
**Post date:** [October 7, 2021, 3:55pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/9 "2021-10-07T15:55:54Z")

</div>

I will try and notify you if it runs correctly

---

<div class="post-metadata">

**Author:** ![juan.angeles](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/juan.angeles/32/16104_2.png) [@juan.angeles](https://forum.katalon.com/u/juan.angeles)\
**Post date:** [October 7, 2021, 4:03pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/10 "2021-10-07T16:03:20Z")

</div>

I ran the test and it stayed the same just open the browser and it doesn’t go from there

 ![DeepinScreenshot_Seleccionar área_20211007110259](https://europe1.discourse-cdn.com/katalon/original/3X/5/6/56c2cb528c72246e6a25eec1f9e59f705d87acad.png)

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [October 7, 2021, 8:00pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/11 "2021-10-07T20:00:40Z")

</div>

How about try with a simpler file name, or remove the “(5)” from the file you have chosen? If the **uploadFile** statement uses RegEx, the parenthesis would cause a concern.

An alternative is to use the Robot to upload a file.

> **Something like:**
>
> ```auto
> import java.awt.Robot
> import java.awt.Toolkit
> import java.awt.datatransfer.StringSelection
> import java.awt.event.KeyEvent
> 
> "set document"
> StringSelection ss = new StringSelection(gImportFileName);
> Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null);
> 
> Robot robot = new Robot();
> robot.keyPress(KeyEvent.VK_ENTER);
> robot.keyRelease(KeyEvent.VK_ENTER);
> robot.keyPress(KeyEvent.VK_CONTROL);
> robot.keyPress(KeyEvent.VK_V);
> robot.keyRelease(KeyEvent.VK_V);
> robot.keyRelease(KeyEvent.VK_CONTROL);
> robot.keyPress(KeyEvent.VK_ENTER);
> robot.keyRelease(KeyEvent.VK_ENTER);
> 
> WebUI.waitForPageLoad(10)
> WebUI.delay(2)
> 
> ```

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [October 7, 2021, 9:13pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/12 "2021-10-07T21:13:24Z")

</div>

> [@juan.angeles](#):
>
> I’m not offended but attach the code above. What do I need to attach more?

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/6/a/6a22d1444cf16e6aaacedbeb9de78db08bee7e51.png)

Make sure you capture all the HTML devoted to presenting that upload button.

---

<div class="post-metadata">

**Author:** ![juan.angeles](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/juan.angeles/32/16104_2.png) [@juan.angeles](https://forum.katalon.com/u/juan.angeles)\
**Post date:** [October 8, 2021, 2:27pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/13 "2021-10-08T14:27:28Z")

</div>

This is the object

 ![DeepinScreenshot_Seleccionar área_20211008091653](https://europe1.discourse-cdn.com/katalon/original/3X/f/4/f4c5e25c356af076b9864263651b1124568e57b7.png)

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [October 8, 2021, 4:01pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/15 "2021-10-08T16:01:19Z")

</div>

I’m posting your other discussion to this thread - please don’t post the same question to two topics, it causes much confusion and divides our resources. Thanks.

---

<div class="post-metadata">

**Author:** ![juan.angeles](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/juan.angeles/32/16104_2.png) [@juan.angeles](https://forum.katalon.com/u/juan.angeles)\
**Post date:** [October 7, 2021, 11:13pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/16 "2021-10-07T23:13:39Z")

</div>

I tested the code but when I run the test if it is locating each of the test objects but it does not load the file.

I’M USING LINUX.IT MUST BE BECAUSE OF THAT?

I share my script

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint  
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase  
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData  
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject  
import static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject  
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint  
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW  
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile  
import com.kms.katalon.core.model.FailureHandling as FailureHandling  
import com.kms.katalon.core.testcase.TestCase as TestCase  
import com.kms.katalon.core.testdata.TestData as TestData  
import com.kms.katalon.core.testobject.TestObject as TestObject  
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS  
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI  
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows  
import internal.GlobalVariable as GlobalVariable  
import org.openqa.selenium.Keys as Keys

WebUI.openBrowser(‘[https://pru-sedesu.elmarquesdigital.com/sedesu/](https://pru-sedesu.elmarquesdigital.com/sedesu/)’)

WebUI.maximizeWindow(FailureHandling.STOP\_ON\_FAILURE)

WebUI.setText(findTestObject(‘Object Repository/Page\_Inicia sesin en sedesu-pru/input\_Usuario o email\_username’), ‘user-ventanilla’)

WebUI.setText(findTestObject(‘Object Repository/Page\_Inicia sesin en sedesu-pru/input\_Contrasea\_password’), ‘Biaani01’)

WebUI.click(findTestObject(‘Page\_Inicia sesin en sedesu-pru/input\_Has olvidado tu contrasea\_login’))

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/a\_Licencias\_side-nav-toggle’))

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/a\_Licencias\_side-nav-toggle’))

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/i\_Pase de Caja\_bx bx-edit bx-sm bx-fw’))

WebUI.setText(findTestObject(‘Object Repository/Page\_SedesuDigital/input\_Pase de caja\_form-control custom-inpu\_12e579’),  
pase\_caja)

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/button\_Buscar’))

WebUI.setText(findTestObject(‘Page\_SedesuDigital/input\_nombre\_trmite’), ‘FUSIÓN DE PREDIOS’)

WebUI.sendKeys(findTestObject(‘Page\_SedesuDigital/input\_nombre\_trmite’), Keys.chord(Keys.ENTER))

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/label\_Acepto el aviso de privacidad’))

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/button\_Comenzar registro’))

WebUI.setText(findTestObject(‘Object Repository/Page\_SedesuDigital/input\_\_form-control custom-input-form ng-un\_5b4895’),  
‘juan.angeles@biaani.com’)

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/button\_Continuar’))

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/div\_Adjuntar trmite llenado a mano’))

CustomKeywords.‘cargar\_archivo.carga\_archivo.uploadFile’(findTestObject(‘Page\_SedesuDigital/i\_carga\_1’),‘/home/bcs-ope-018/Documentos/Archivo Carga SEDESU/EUR140901TD0.pdf’)  
Thread.sleep(2500) //Millisecond 2.5 second delay only if needed

CustomKeywords.‘cargar\_archivo.carga\_archivo.uploadFile’(findTestObject(‘Page\_SedesuDigital/button\_carga\_2’),‘/home/bcs-ope-018/Documentos/Archivo Carga SEDESU/EUR140901TD0.pdf’)  
Thread.sleep(2500) //Millisecond 2.5 second delay only if needed

CustomKeywords.‘cargar\_archivo.carga\_archivo.uploadFile’(findTestObject(‘Page\_SedesuDigital/button\_carga\_3’),‘/home/bcs-ope-018/Documentos/Archivo Carga SEDESU/EUR140901TD0.pdf’)  
Thread.sleep(2500) //Millisecond 2.5 second delay only if needed

CustomKeywords.‘cargar\_archivo.carga\_archivo.uploadFile’(findTestObject(‘Page\_SedesuDigital/button\_carga\_4’),‘/home/bcs-ope-018/Documentos/Archivo Carga SEDESU/EUR140901TD0.pdf’)  
Thread.sleep(2500) //Millisecond 2.5 second delay only if needed

CustomKeywords.‘cargar\_archivo.carga\_archivo.uploadFile’(findTestObject(‘Page\_SedesuDigital/button\_carga\_5’),‘/home/bcs-ope-018/Documentos/Archivo Carga SEDESU/EUR140901TD0.pdf’)  
Thread.sleep(2500) //Millisecond 2.5 second delay only if needed

CustomKeywords.‘cargar\_archivo.carga\_archivo.uploadFile’(findTestObject(‘Page\_SedesuDigital/button\_carga\_6’),‘/home/bcs-ope-018/Documentos/Archivo Carga SEDESU/EUR140901TD0.pdf’)  
Thread.sleep(2500) //Millisecond 2.5 second delay only if needed

CustomKeywords.‘cargar\_archivo.carga\_archivo.uploadFile’(findTestObject(‘Page\_SedesuDigital/button\_carga\_7’),‘/home/bcs-ope-018/Documentos/Archivo Carga SEDESU/EUR140901TD0.pdf’)  
Thread.sleep(2500) //Millisecond 2.5 second delay only if needed

CustomKeywords.‘cargar\_archivo.carga\_archivo.uploadFile’(findTestObject(‘Page\_SedesuDigital/button\_carga\_8’),‘/home/bcs-ope-018/Documentos/Archivo Carga SEDESU/EUR140901TD0.pdf’)  
Thread.sleep(2500) //Millisecond 2.5 second delay only if needed

CustomKeywords.‘cargar\_archivo.carga\_archivo.uploadFile’(findTestObject(‘Page\_SedesuDigital/button\_carga\_9’),‘/home/bcs-ope-018/Documentos/Archivo Carga SEDESU/EUR140901TD0.pdf’)  
Thread.sleep(2500) //Millisecond 2.5 second delay only if needed

CustomKeywords.‘cargar\_archivo.carga\_archivo.uploadFile’(findTestObject(‘Page\_SedesuDigital/button\_carga\_10’),‘/home/bcs-ope-018/Documentos/Archivo Carga SEDESU/EUR140901TD0.pdf’)  
Thread.sleep(2500) //Millisecond 2.5 second delay only if needed

CustomKeywords.‘cargar\_archivo.carga\_archivo.uploadFile’(findTestObject(‘Page\_SedesuDigital/button\_carga\_11’),‘/home/bcs-ope-018/Documentos/Archivo Carga SEDESU/EUR140901TD0.pdf’)  
Thread.sleep(2500) //Millisecond 2.5 second delay only if needed

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/div\_FUSIN DE PREDIOS DOCUMENTOS DIGITALIZAD\_01389b’))

WebUI.click(findTestObject(‘Object Repository/Page\_SedesuDigital/div\_notificar’))

WebUI.closeBrowser()

 ![DeepinScreenshot_Seleccionar área_20211007181230](https://europe1.discourse-cdn.com/katalon/original/3X/4/8/4832a347d0abaebeee3ccd66427d305d5d18de30.png)

 ![DeepinScreenshot_Seleccionar área_20211007181149](https://europe1.discourse-cdn.com/katalon/original/3X/3/7/37e87c05590a5be70d4145cb530b68ce0598e646.png)

---

<div class="post-metadata">

**Author:** ![Dave\_Evers](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dave_evers/32/435_2.png) [@Dave\_Evers](https://forum.katalon.com/u/Dave_Evers)\
**Post date:** [October 8, 2021, 3:41am UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/17 "2021-10-08T03:41:24Z")

</div>

@juan.angeles. Try this alternative solution: [How-to use ‘sendKeys’ or 'File Upload' to upload files](http://forum.katalon.com/t/how-to-use-sendkeys-or-file-upload-to-upload-files/54758)

---

<div class="post-metadata">

**Author:** ![juan.angeles](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/juan.angeles/32/16104_2.png) [@juan.angeles](https://forum.katalon.com/u/juan.angeles)\
**Post date:** [October 8, 2021, 2:24pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/18 "2021-10-08T14:24:48Z")

</div>

Try the way you indicated but the object appears as a button and does not show the type = file

 ![DeepinScreenshot_Seleccionar área_20211008091653](https://europe1.discourse-cdn.com/katalon/original/3X/f/4/f4c5e25c356af076b9864263651b1124568e57b7.png)

---

<div class="post-metadata">

**Author:** ![Dave\_Evers](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dave_evers/32/435_2.png) [@Dave\_Evers](https://forum.katalon.com/u/Dave_Evers)\
**Post date:** [October 8, 2021, 2:35pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/19 "2021-10-08T14:35:08Z")

</div>

@juan.angeles you want to use sendKeys on the type=‘file’ object, read what I said in my post above regarding must be type=‘file’. As Russ pointed out it’s highlighted in green.

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [October 8, 2021, 4:03pm UTC](https://forum.katalon.com/t/file-upload-with-button-in-katalon-studio/58972/20 "2021-10-08T16:03:22Z")

</div>

The object you need to deal with is highlighted in green:

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/8/8/880921d4c666d70e01b451cab6ec6e4669841cf3.png)
