# Upload Multiple File

**URL:** <https://forum.katalon.com/t/upload-multiple-file/52821>\
**Category:** Miscellaneous\
**Tags:** start-page\
**Created:** [March 10, 2021, 9:03am UTC](https://forum.katalon.com/t/upload-multiple-file/52821 "2021-03-10T09:03:37Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ferrariklersone](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ferrariklersone/32/15706_2.png) [@ferrariklersone](https://forum.katalon.com/u/ferrariklersone)\
**Post date:** [March 10, 2021, 9:03am UTC](https://forum.katalon.com/t/upload-multiple-file/52821/1 "2021-03-10T09:03:37Z")

</div>

Hello guys,  
How can i automate two uploading files in this situation ?  
So i created two keywords with different filepath, but only one keyword could be running not two in the same time.

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/5/2/5232dd51447ef9dc8a175583e66ef193c454673d.png)  
Is someone could help me ? thank you very much in advanced.

---

<div class="post-metadata">

**Author:** ![anon46315158](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@anon46315158](https://forum.katalon.com/u/anon46315158)\
**Post date:** [March 10, 2021, 12:05pm UTC](https://forum.katalon.com/t/upload-multiple-file/52821/2 "2021-03-10T12:05:16Z")

</div>

in a real usage scenario, how an user will click both buttons at the same time to upload them simultaneously?

---

<div class="post-metadata">

**Author:** ![ferrariklersone](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ferrariklersone/32/15706_2.png) [@ferrariklersone](https://forum.katalon.com/u/ferrariklersone)\
**Post date:** [March 10, 2021, 1:32pm UTC](https://forum.katalon.com/t/upload-multiple-file/52821/3 "2021-03-10T13:32:47Z")

</div>

Not at the same time bro, one by one.  
But I don’t know how to solve it.

---

<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:** [March 10, 2021, 1:34pm UTC](https://forum.katalon.com/t/upload-multiple-file/52821/4 "2021-03-10T13:34:42Z")

</div>

Well, it’s procedural. Use the first button, first. The second button, second.

Use this method, _twice_:

> **[\[WebUI\] Upload File](https://docs.katalon.com/katalon-studio/docs/webui-upload-file.html)**
>
> Description Upload file to an input with type = "file". Parameters   Param Param Type Mandatory Description to TestObject Required Represent a web element. fileAbsolutePath  String Required Absolute path of...

---

<div class="post-metadata">

**Author:** ![ferrariklersone](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ferrariklersone/32/15706_2.png) [@ferrariklersone](https://forum.katalon.com/u/ferrariklersone)\
**Post date:** [March 10, 2021, 1:42pm UTC](https://forum.katalon.com/t/upload-multiple-file/52821/5 "2021-03-10T13:42:41Z")

</div>

I already used a keyword method and it works righlty.  
But i have two files to upload.  
I have created two keywords method, but when i run, only one works.

---

<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:** [March 10, 2021, 1:44pm UTC](https://forum.katalon.com/t/upload-multiple-file/52821/6 "2021-03-10T13:44:59Z")

</div>

Show  
me  
the  
code  
and  
errors

---

<div class="post-metadata">

**Author:** ![ferrariklersone](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ferrariklersone/32/15706_2.png) [@ferrariklersone](https://forum.katalon.com/u/ferrariklersone)\
**Post date:** [March 10, 2021, 1:59pm UTC](https://forum.katalon.com/t/upload-multiple-file/52821/7 "2021-03-10T13:59:34Z")

</div>

Here is the code :

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

Here is the test result

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

The first keword works correctly, and joins the doc1. But the second, just opens widows, no file uploaded.

---

<div class="post-metadata">

**Author:** ![gsp](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/gsp/32/20464_2.png) [@gsp](https://forum.katalon.com/u/gsp)\
**Post date:** [March 10, 2021, 2:00pm UTC](https://forum.katalon.com/t/upload-multiple-file/52821/8 "2021-03-10T14:00:42Z")

</div>

Verify once with 1st upload file and move to Next upload file Link  
Must have different attributes for both upload buttons

---

<div class="post-metadata">

**Author:** ![gsp](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/gsp/32/20464_2.png) [@gsp](https://forum.katalon.com/u/gsp)\
**Post date:** [March 10, 2021, 2:06pm UTC](https://forum.katalon.com/t/upload-multiple-file/52821/9 "2021-03-10T14:06:01Z")

</div>

> [@ferrariklersone](#):
>
> joins the doc1

With second can you try same path with first file and Verify the upload button click?

---

<div class="post-metadata">

**Author:** ![ferrariklersone](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ferrariklersone/32/15706_2.png) [@ferrariklersone](https://forum.katalon.com/u/ferrariklersone)\
**Post date:** [March 10, 2021, 2:17pm UTC](https://forum.katalon.com/t/upload-multiple-file/52821/10 "2021-03-10T14:17:35Z")

</div>

the first object concerns the uploading of the visa file, the second for the passport file.  
I captured these objects on spy web.

---

<div class="post-metadata">

**Author:** ![anon46315158](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@anon46315158](https://forum.katalon.com/u/anon46315158)\
**Post date:** [March 10, 2021, 2:33pm UTC](https://forum.katalon.com/t/upload-multiple-file/52821/11 "2021-03-10T14:33:48Z")

</div>

> [@ferrariklersone](#):
>
> but only one keyword could be running not two in the same time.

Contradicts with

> [@ferrariklersone](#):
>
> Not at the same time bro, one by one.

… bro.

But OK, we got it, you wan’t it **sequentially** , how an actual user will do.  
Now is time for you to share also the code of the keywords and test objects and the html of the page so somebody can check if the locators in use are correct.  
Don’t blindly trust the spy utility, there are chances that after you upload the first file, the html code of the page may slightly change.

---

<div class="post-metadata">

**Author:** ![Brandon\_Hein](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/brandon_hein/32/1092_2.png) [@Brandon\_Hein](https://forum.katalon.com/u/Brandon_Hein)\
**Post date:** [March 10, 2021, 5:20pm UTC](https://forum.katalon.com/t/upload-multiple-file/52821/12 "2021-03-10T17:20:47Z")

</div>

Agreed, we need to see the HTML of those two fields, so that we can give you unique identifiers that will locate them correctly. They are most likely `<input>` elements. I have an old topic that may be relevant here as well:

> [@How to Resolve File Upload Issues](http://forum.katalon.com/t/how-to-resolve-file-upload-issues/29812):
>
> I’ve been seeing several topics around issues with uploading files to a web application when using the WebUI.uploadFile() method, so I thought I’d share the best alternative approach (note: this is the same approach that one would take in Selenium as well): Step 1: Identify the file upload field Lets take a typical file upload field: [image] What we want is the \<input\> element for the field, which will look something like this (with probably a bunch of other attributes): \<input type="file" …
