# How to upload photos to an ad site?

**URL:** <https://forum.katalon.com/t/how-to-upload-photos-to-an-ad-site/59164>\
**Category:** Web Testing\
**Tags:** katalon-recorder\
**Created:** [October 14, 2021, 2:16am UTC](https://forum.katalon.com/t/how-to-upload-photos-to-an-ad-site/59164 "2021-10-14T02:16:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamfouiny](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/jamfouiny/32/16104_2.png) [@jamfouiny](https://forum.katalon.com/u/jamfouiny)\
**Post date:** [October 14, 2021, 2:16am UTC](https://forum.katalon.com/t/how-to-upload-photos-to-an-ad-site/59164/1 "2021-10-14T02:16:18Z")

</div>

Hello to all,

I would like to automate the posting of ads from an excel. I have succeeded in all the procedure except to put the pictures automatically on a desktop.

I tried the command “type”, “upload” with a css, xpath.

Nothing works, the site is [leboncoin, site de petites annonces gratuites](https://www.leboncoin.fr/deposer-une-annonce) and you can find the source code of the page

thanks in advance to all 🙂

 ![1](https://europe1.discourse-cdn.com/katalon/original/3X/3/f/3feb35cf55962e81d04980b07cbac0fe2a40b468.png) ![2](https://europe1.discourse-cdn.com/katalon/original/3X/7/8/782b8527d33abb88a0e29f6e5f346ffa6ba875e6.png)

---

<div class="post-metadata">

**Author:** ![ThanhTo](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thanhto/32/697_2.png) [@ThanhTo](https://forum.katalon.com/u/ThanhTo)\
**Post date:** [October 14, 2021, 9:09am UTC](https://forum.katalon.com/t/how-to-upload-photos-to-an-ad-site/59164/2 "2021-10-14T09:09:07Z")

</div>

Hi, does the site support drag and drop to upload? I can’t understand the website so I need more information 🙂

---

<div class="post-metadata">

**Author:** ![jamfouiny](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/jamfouiny/32/16104_2.png) [@jamfouiny](https://forum.katalon.com/u/jamfouiny)\
**Post date:** [October 14, 2021, 12:16pm UTC](https://forum.katalon.com/t/how-to-upload-photos-to-an-ad-site/59164/3 "2021-10-14T12:16:25Z")

</div>

There are two solutions either drag and drop or click directly. Here is the source code of the photo location.

Screen recorder : [https://vimeo.com/manage/videos/631940915](https://vimeo.com/manage/videos/631940915)

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![ThanhTo](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thanhto/32/697_2.png) [@ThanhTo](https://forum.katalon.com/u/ThanhTo)\
**Post date:** [October 14, 2021, 1:44pm UTC](https://forum.katalon.com/t/how-to-upload-photos-to-an-ad-site/59164/4 "2021-10-14T13:44:53Z")

</div>

I saw this element from your video

![image](https://europe1.discourse-cdn.com/katalon/optimized/3X/9/0/9074c6c279a42969ae05c56280e1e0efc8fdc9b2_2_690x13.png)

Please try to use that element for the `type` command instead to see if it works. The type command should be able to upload files on `input` elements with `type='file'`.

---

<div class="post-metadata">

**Author:** ![jamfouiny](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/jamfouiny/32/16104_2.png) [@jamfouiny](https://forum.katalon.com/u/jamfouiny)\
**Post date:** [October 14, 2021, 7:21pm UTC](https://forum.katalon.com/t/how-to-upload-photos-to-an-ad-site/59164/5 "2021-10-14T19:21:01Z")

</div>

Incredibly, it works! I copied the XPath from the line you just told me and with the guy it works perfectly. For others who come across this here is the start line attached.

Thanks so much ! 🙂

 ![1](https://europe1.discourse-cdn.com/katalon/original/3X/6/9/692f8bc57f2f2b5d77d027c643bbc05e826072de.png) ![2](https://europe1.discourse-cdn.com/katalon/original/3X/8/f/8f2252e33fee0487b82a125ea96a5cb44bc9e395.png)
