How to upload files using Selenium WebDriver Python | Browse File Using System Explorer

Поділитися
Вставка
  • Опубліковано 1 лис 2024

КОМЕНТАРІ • 65

  • @fernandoz6329
    @fernandoz6329 9 днів тому +1

    Great video. I've been automatizing the yt upload because API restrictions and your example worked flawlessly.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  8 днів тому +1

      Glad you found it helpful :)
      Please like and share the video and help us spread the word.

  • @SifuNH
    @SifuNH 2 місяці тому +1

    Hello and namaste! OMG this is a life saver! I have been struggling with how to do this for the last 2 days. And then I find this and BANG! Using the pynput module could just be my new favorite Python module!! Thank you again!

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 місяці тому +1

      Glad you found it helpful :)
      Please like and share the video and help us spread the word.

  • @paramchaudhary2078
    @paramchaudhary2078 Рік тому +3

    This is incredible, You don't know how is this helpful for me 👍👍👍

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Glad you found it helpful :)
      Please like and share the video and help us spread the word.

  • @sourabhbinotra3220
    @sourabhbinotra3220 3 місяці тому +1

    Great Video! Love it! I am Creating an Automation where I used this code for uploading multiple pdf files(Using for loop, of-course I am using a LIST of pdf files) to an asset management tool but somehow the code is not working for me. The ask is to upload the pdf files from the local machine to Asset management Tool using system Popup.
    Any specific reason ? or Shall I use some other library ?

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 місяці тому +1

      Can you please provide more details about the issue you are seeing?

  • @tanmaydesai9974
    @tanmaydesai9974 7 місяців тому +1

    hi, truly great video dude helped me a lot on a college capstone project i am working on , but i am getting issue as the code runs successfully but after opening and uploading the chrome/edge/Firefox window closes immediately, can you please guide me !

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  7 місяців тому +1

      Glad you found it helpful :)
      Please like and share the video and help us spread the word.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  7 місяців тому +1

      Please send me the code and I can take a look at it and check why the browser is closing after uploading the file.

  • @gulrukh1386
    @gulrukh1386 6 місяців тому +2

    you resolved one of my very big issue, thanks a lot..
    appreciated highly..

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  6 місяців тому +1

      Glad you found it helpful :)
      Please like and share the video and help us spread the word.

  • @deveriesco869
    @deveriesco869 6 місяців тому +1

    Can you target the element with selenium and click on it using pynput?

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  6 місяців тому +1

      The only reason we use an external library pynput is because Selenium WebDriver can't interact with system pop-up. Browser interaction should happen using Selenium WebDriver, there is no need to use other libraries unless there is a need. It makes the framework unstable.

  • @ChaitanyaSharma-c2l
    @ChaitanyaSharma-c2l 8 місяців тому +1

    Very helpful video , I don't have any word

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  8 місяців тому +1

      Glad you found it helpful :)
      Please like and share the video and help us spread the word.

  • @UnderMinuteMotivation
    @UnderMinuteMotivation 6 місяців тому +2

    it really helped me a lot, bundle of thanks!

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  6 місяців тому +1

      Glad you found it helpful :)
      Please like and share the video and help us spread the word.

  • @ashitoshwagh3215
    @ashitoshwagh3215 7 місяців тому +1

    What about continuing with Selenium after uploading the file? When we try to verify the visibility of the file we get the NoSuchWindowException.
    How can we continue to automate using selenium?

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  7 місяців тому +1

      There is nothing different needed to continue as we never moved away from Selenium WebDriver code, we simply incorporated the pynput library.
      You can simply wait for the next element you want to interact with and work with it.

  • @rhythm6531
    @rhythm6531 2 місяці тому +1

    Thank you so much you are the man !!!
    😍

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 місяці тому +2

      Glad you found it helpful :)
      Please like and share the video and help us spread the word.

  • @3ztit
    @3ztit 4 місяці тому +1

    Good one. However instead of Png can you choose pdf?Cause when I upload a PDF it saves as a png file. So need to select All files and then upload the pdf file.

  • @ManojKumar-zn2gf
    @ManojKumar-zn2gf Рік тому +1

    Hello @Let's Kode It, the video was really amazing. Is it possible to move files from local machine to remote server Eg. I have a test.xlsx file in local machine that needs to be uploaded into Archive folder of remote machine using selenium python? No need to upload into any websites.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Selenium WebDriver works for browsers only. If you simply want to copy a file from local machine to remote server, then you can implement a simple python script. There is no need of Selenium WebDriver for that.

  • @muriloeduardo8353
    @muriloeduardo8353 Рік тому +1

    Thank you, you helped me a lot in this video

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

  • @PLSQLiFE
    @PLSQLiFE 5 місяців тому +1

    Can you pls let me know how do you send cmd+shift+g in Mac?

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  5 місяців тому +1

      keyboard.press(Key.cmd)
      keyboard.press(Key.shift)
      keyboard.press("g")
      keyboard.release("g")
      keyboard.release(Key.shift)
      keyboard.release(Key.cmd)

  • @shreyasdoshi8956
    @shreyasdoshi8956 Рік тому +1

    This is another great way to send the path using keyboard. But can you also let us know how to do using pytest framework?

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      pytest is a test framework which provided fixtures/annotations to run tests. It has nothing to do with uploading files or handling file uploads.

  • @chhamzamaqsood
    @chhamzamaqsood Рік тому +1

    Cool. I have a question I made a whatsapp automation tool and worries about one thing if i use send key in my local machine and give a absolute path like C:\\Users\\HP\\Desktop\\video.mp4 it send video. but my question is if i deploy it online will absolute path work? in users pc? if no whats alternative to provide file to upload

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      You should store the file on the remote server and use the relative path.

    • @chhamzamaqsood
      @chhamzamaqsood Рік тому +1

      @@LetsKodeItOfficial please tell which remote server is best

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      @@chhamzamaqsood By remote server, I referred to wherever you want to deploy online.

  • @manh9105
    @manh9105 9 місяців тому +1

    Hi! what will be the path like in mac?

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  9 місяців тому +1

      Right click the file and click Get Info, you can find the file path from Get Info pop-up.

  • @dineshpentakota1514
    @dineshpentakota1514 5 місяців тому +1

    really really super bhaiya

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  5 місяців тому +1

      Glad you found it helpful :)
      Please like and share the video and help us spread the word.

  • @shankar9920
    @shankar9920 Рік тому +1

    Extremely helpful brother but can you help me with how to upload multiple files with same.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Simply follow the manual steps for UI Automation. You just need to repeat the process for multiple files.

    • @shankar9920
      @shankar9920 Рік тому

      @@LetsKodeItOfficial I tried to do so. I have 6 files I tried one by one approach but it opens multiple explorers and uploads only 1st and 5th files.

  • @gabrielsilveira6445
    @gabrielsilveira6445 6 місяців тому +1

    Thaaaaanks! 🎉

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  6 місяців тому +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

  • @sombra570
    @sombra570 Рік тому +2

    Justo lo que buscaba, buen video ;)

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

  • @marwanshahid6922
    @marwanshahid6922 3 місяці тому +1

    Like every coding tutorial I've ever watched, the very first step doens;'t work

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  3 місяці тому +1

      If you need support, please provide details. We will try to help.

  • @ManPursueExcellence
    @ManPursueExcellence 10 місяців тому +1

    Mac's file system (Finder) does not let you enter the file path like you did like on WIndows.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  10 місяців тому +1

      You can first send cmd+shift+g and then it will provide a text field to enter the file path.

    • @ManPursueExcellence
      @ManPursueExcellence 10 місяців тому +1

      @@LetsKodeItOfficial Oh really!? Man, I needed you to tell me that 4 days ago before I shifted my focus to Windows. 😂

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  10 місяців тому +2

      @@ManPursueExcellence Haha, sorry I didn't get a chance before to get back to you. Hope this helps 👍

  • @FutbolFilmFactory
    @FutbolFilmFactory Рік тому +1

    great vid 😃😃👍👍

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

  • @rafaelcandido1384
    @rafaelcandido1384 11 місяців тому +1

    PERFEITO!!!

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  11 місяців тому +2

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

  • @sarrabouajina8319
    @sarrabouajina8319 Рік тому +1

    thank yoou so much

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

  • @sharpmouse3013
    @sharpmouse3013 Рік тому +1

    nice 😄

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

  • @naveensampath6008
    @naveensampath6008 9 місяців тому +1

    No Its Not working for me ... Could you help me out
    keyboard = Controller()
    keyboard.type("C:\\Users\
    aveen.sampath\\Desktop\\MCdermottcosta\\Progressive\\DownloadedPDF\\Progressive - Boyd, Robert - Notice Of Conditional Renewal - Effective - 12-27-23 - 5.pdf")
    keyboard.press(Key.enter)
    keyboard.release(Key.enter)