How to upload files using Selenium WebDriver Python | Easiest Elements Trick | Native Selenium Way
You will learn easiest way of Uploading Files Using Selenium Python without any 3rd party tools like Robot Class or AutoIT.
Rohini's Channel: YumWithRohini
/ @yumwithrohini
Mumbai Masala Toast Sandwich: • Mumbai Masala Toast Sa...
Instagram: / aniltomar
Rohini's Instagram: / its_rohini_tomar
Facebook Page: / its.rohini.tomar
****************************************************************
Complete Test Automation Bundle ($29.99 Only):
Includes 9 Courses, future new test and automation courses will be added to this bundle
courses.letskodeit.com/course...
****************************************************************
Selenium WebDriver With Java ($8.99 Only):
courses.letskodeit.com/course...
****************************************************************
Selenium WebDriver With Python ($8.99 Only):
courses.letskodeit.com/course...
****************************************************************
Selenium WebDriver Bundle ($19 Only):
learn.letskodeit.com/p/seleni...
****************************************************************
Please be our Patron and support us to provide you great content:
/ letskodeit
Website:
www.letskodeit.com
Join Private Facebook Group:
/ letskodeit
Follow us on Facebook and Twitter for technology updates:
/ letskodeit
/ letskodeit
#seleniumfileupload #seleniumpython #seleniumpythonfileupload
Пікірлер: 94
Again, as expected an awesome explanation. Thanks!
@LetsKodeItOfficial
3 жыл бұрын
Thanks :)
Thanks for making this video, For a very long time I was trying to upload a file on Facebook but it was not working, I tried copying many element's XPATH but it was not working, now I got understood the concept. Thanks a lot.
@LetsKodeItOfficial
Жыл бұрын
Glad you found it helpful :) Please like and share the video and help us spread the word.
Thank you very much...struggled for days and now relieved that found a way thru you sir....
@LetsKodeItOfficial
2 жыл бұрын
Glad you found it helpful, please like and share the video to spread the word :)
Thanks for making this kind of tricky task solution Sir 🤩🤩🤩🤩🤩
@LetsKodeItOfficial
Жыл бұрын
Glad you found it helpful :) Please like and share the video and help us spread the word.
Outstanding video. Helped me figure out this process. Thanks
@LetsKodeItOfficial
2 жыл бұрын
Glad you found it helpful :) Please like and share the video and help us spread the word.
Best Teacher ! Best way to explain with examples👍
@LetsKodeItOfficial
Жыл бұрын
Glad you found it helpful :) Please like and share the video and help us spread the word.
Thq So much. Well explained and helped me to understand the concept very easily. Struggled badly by selecting a wrong element to upload the file.
@LetsKodeItOfficial
Жыл бұрын
Glad you found it helpful :) Please like and share the video and help us spread the word.
Hello sir, what a great observation.. I have wasted big time in autoit.. Thank you
@LetsKodeItOfficial
2 жыл бұрын
Glad you found it helpful :) Please like and share the video and help us spread the word.
Thank you so much...Very well explained and i the issue i faced had to do with correcting the element.
@LetsKodeItOfficial
2 жыл бұрын
Glad you found it helpful :) Please like and share the video and help us spread the word.
Great information. Thank you, you have been really really helpful
@LetsKodeItOfficial
11 ай бұрын
Glad you found it helpful :) Please like and share the video and help us spread the word.
Nice explanation for file upload. thank you
@LetsKodeItOfficial
3 жыл бұрын
Glad you liked it :) Please share the video to spread the word.
you sir are very awesome regarding your tutoring skill..Best teacher and info vid I have ever seen!!! Good work, excellent presentation and use of examples..Why can we not have all teachers present subject matter this way?? Then we would all learn much MUCH faster..
@LetsKodeItOfficial
Жыл бұрын
Glad you found it helpful :) Please like and share the video and help us spread the word.
Thankyou so much it works😊
@LetsKodeItOfficial
3 жыл бұрын
Glad you found it helpful :) Please like and share the video to spread the word. You can also look at the description of the video to find the full course information.
Muito Obrigado. Sou do Brasil e sua dica me ajudou muito.
@LetsKodeItOfficial
Жыл бұрын
Glad you found it helpful :) Please like and share the video and help us spread the word.
Hi, im trying to apply your method In a website but code don't recognise me the XPATH of the imput. Maybe it is because the imput is hidden¿? when I look it on the web code, it has grey color. Also, you explained how to search id type [@id=' '], whith class type would be the same? [@class=' '] This is the XPATH that i get from copying as u did (but on the website that im trying to do it) /html/body/tsl-root/tsl-private/div/div/div/tsl-upload/div/div/tsl-upload-product/form/div[2]/tsl-drop-area/div/div[2]/div/div[1]/label/input Thank you for your work, really aprecciate it!
@alkdn3507
2 жыл бұрын
Hi, i think I solved my problem. Code for imput was hidden by this = _ngcontent-sen-c141, inside the class. So I deleted it and Input is now with colour!, now I need to implement it to my python code using Js, idk how hahaha I will try something.
@LetsKodeItOfficial
2 жыл бұрын
@@alkdn3507 Glad you were able to figure it out 😊😊
thanks a lot realy apreciate it :)
@LetsKodeItOfficial
Жыл бұрын
Glad you found it helpful :) Please like and share the video to spread the word and help us.
Perfect!
@LetsKodeItOfficial
2 жыл бұрын
Glad you found it helpful, please like and share the video to spread the word :)
Excellent video with a lot of clarity. i followed along and it worked. is it possible to find a work around when you want to upload to chrome images? How exactly to upload a file in selenium using google 'upload a file' with python on windows. the inspection tool doesn't show an input tag or id.
@LetsKodeItOfficial
7 ай бұрын
Glad you found it helpful :) Please like and share the video and help us spread the word.
@LetsKodeItOfficial
7 ай бұрын
Please go through this video for the Windows browse button: kzread.info/dash/bejne/jKOc18aFiJyslrw.html
@stefangraham7117
7 ай бұрын
I have also checked that video. But the Google browser image search I can't find the "ID". Is there a workaround because I know some of these have hidden inputs but again I checked those and it was super confusing to reveal and use. Those also didn't have a "ID" to reference.
@LetsKodeItOfficial
7 ай бұрын
@@stefangraham7117 You don't need ID, you need to find the element. It may or may not have an id attribute. If id attribute is not there then you can build XPath.
@LetsKodeItOfficial
7 ай бұрын
@@stefangraham7117 Also, you don't need to find hidden element also if you are using browse file way which was discussed in the other video. You can simply click on the browse button and select the file you want as shown in the video.
Wow great video, but I need another way to upload images, recaude in my case the web code doesn't have an input but it is a tag that contains a class and this class is the one that performs the event of opening the system Windows to select a file from our computer.... Please help In already following you and activated the bell for that video with the solution.
@LetsKodeItOfficial
2 жыл бұрын
We can use pynput library for that, I will upload a video on that.
@LetsKodeItOfficial
2 жыл бұрын
@Sudha Chauhan Jannabhatla I haven't created that yet. I will try to work on that in future.
How to upload two more images at one time? in (Mac) ex)window: desktop\"file1.jpg" "file2.jpg"
@LetsKodeItOfficial
2 жыл бұрын
There is nothing automation do it differently. It is all about what is supported by the website. If the website supports uploading of multiple files at one time then you can send both the file locations one after the other before clicking on upload button.
thx sir
@LetsKodeItOfficial
Жыл бұрын
Glad you found it helpful :) Please like and share the video to spread the word and help us.
Thanks
@LetsKodeItOfficial
2 жыл бұрын
Glad you found it helpful, please like and share the video to spread the word :)
you are a lifesaver
@LetsKodeItOfficial
Жыл бұрын
Glad you found it helpful :) Please like and share the video and help us spread the word.
🔥
@LetsKodeItOfficial
Жыл бұрын
Glad you found it helpful :)
@RHCIPHER
Жыл бұрын
@@LetsKodeItOfficial i want to upload many file at the same time i did the thing i read all files who are in my folder then i pass them to the send keys but the problem is that some times the file size is big so the small ones it duplicates i put sleep(number) IT FIxed the problem but not optimal because i have no specific sleep do you have a better method
@LetsKodeItOfficial
Жыл бұрын
@@RHCIPHER "Sometimes the file is is big, so it duplicates the small ones" I didn't understand the actual problem. Can you please explain again?
@RHCIPHER
Жыл бұрын
i fixed it thx any way
nice bro
@LetsKodeItOfficial
3 жыл бұрын
Glad you liked it :) Please share the video to spread the word.
unable to find that second video in which you're gonna show uploading file to browser using file explorer too
@LetsKodeItOfficial
Жыл бұрын
Haven't created the video yet 👍
Hi sir, This video is very usefull. I'm trying to use this way for upload image on facebook post but it doesn't work :( Can you help me with it Thank you very much
@LetsKodeItOfficial
Жыл бұрын
Glad you found it helpful :) Please like and share the video and help us spread the word.
@LetsKodeItOfficial
Жыл бұрын
What's the issue you are seeing?
Hello, the explanation was very Crisp. Can you please demo how to it system explorer way
@LetsKodeItOfficial
2 жыл бұрын
Sure, I will work on that. Please subscribe and check your notification to make sure you don't miss the video.
Great. How i use, user-data-dir? Please.
@LetsKodeItOfficial
3 жыл бұрын
I am already planning to add a video about it.
@MatheusSilva-qm3ph
3 жыл бұрын
@@LetsKodeItOfficial Cool. I'll be waiting.
Sir What’s the difference between the Selenium and SelectorsHub?
@LetsKodeItOfficial
3 жыл бұрын
Selenium WebDriver is the actual tool used to automate browsers. SelectorsHub is just a browser extension to inspect elements, we don't even need it for automation. We can simply use Chrome Dev Tools.
@kritishah1659
3 жыл бұрын
@@LetsKodeItOfficial thanks for the reply sir. I got it and tried it, actually for my project this tool SelectorsHub works while devtools doesn’t work because my project has lots of shadow dom which only SelectorsHub supports
Hi sir how would you upload multiple files instead of just one file ?
@LetsKodeItOfficial
3 жыл бұрын
There is nothing different to upload multiple files. If the website supports uploading multiple files, then you can use send_keys() method number of times you want to use.
@LetsKodeItOfficial
3 жыл бұрын
@Kim Hung LEE If the website doesn't support then there is nothing automation can do. Features need to be supported by the application, not by testing.
@ammarabbasi4229
2 жыл бұрын
@Kim Hung LEE did u find out how to upload multiple photos??
Hi, Could you please demo the other way with out using send keys method.
@LetsKodeItOfficial
2 жыл бұрын
Sure, I will work on that. Please subscribe and check your notification to make sure you don't miss the video.
How to do drag and drop code for this 2nd site?
@LetsKodeItOfficial
3 жыл бұрын
We can't drag a file which is on the desktop using Selenium WebDriver as it can only automate browsers. Anything outside of browsers cannot be automated by Selenium WebDriver Automation.
@thakkarharsh6766
3 жыл бұрын
@@LetsKodeItOfficial thanks, and 2nd que is how to do send_keys and click method in request library.
@LetsKodeItOfficial
3 жыл бұрын
@@thakkarharsh6766 Please explain what exactly you meant by use these methods in request library?
and how to send files and not only one file?
@LetsKodeItOfficial
2 жыл бұрын
It depends on the website functionality. If the website accepts more than one file, we can provide path for multiple files
Please add movie how to add file using system dialog window #python + #selenium #linux. Thx :)
@LetsKodeItOfficial
2 жыл бұрын
Sure, I will work on that. Please subscribe and check your notification to make sure you don't miss the video.
@michamyrcha3134
2 жыл бұрын
@@LetsKodeItOfficial of course, but please use example how to do it on Ubuntu system, there is no any tutorial like that. But there are many connected to Windows.
@LetsKodeItOfficial
2 жыл бұрын
@@michamyrcha3134 Most likely I will be using Mac (Unix) or Windows. But it doesn't matter, OS doesn't change any concept of Selenium WebDriver Automation. There is no difference in code other than the path of the file.
HOW TO UPLOAD FILE TO INSTA PROFILE
@LetsKodeItOfficial
2 жыл бұрын
Open Instagram on browser and follow the concept shown in this video.
@hasyaactive2984
2 жыл бұрын
@@LetsKodeItOfficial but there is no input tag
@LetsKodeItOfficial
2 жыл бұрын
@@hasyaactive2984 In that scenario, you need to use pynput library to browse the files from the computer. I will be posting a video about this also in future.