Part21: WebdriverIO with TypeScript - Validate file type

Sdílet
Vložit
  • čas přidán 12. 09. 2024
  • #webdriverio #typescript #nodejs #beginners #bddframework #wdio #async #wdio7 #webdriveriocucumber #downloadfile
    In this video, we will see how we can get extension of file, validate it and also create utility to delete folder after validation completes.
    In this tutorial series, we will be building a fully functional test automation framework in TypeScript using WebdriverIO and integrate our tests with Cucumber, Allure Report.
    Important Link:
    ------------------------
    Git Repository: github.com/tes...
    Connect with me on LinkedIn: / sadabnepal

Komentáře • 18

  • @constantine2315
    @constantine2315 Před rokem

    So cool explanation!

  • @alexsoft5260
    @alexsoft5260 Před 3 lety

    awesoooome

    • @TestAutomationHub
      @TestAutomationHub  Před 3 lety

      Hi Alex. I see you have asked some question on video 20 but CZcams automatically removed comment I guess (happens when it contains some link). Can you post it again and make sure no URL or link is present in comment so that I can look at it

    • @alexsoft5260
      @alexsoft5260 Před 3 lety +1

      Needless already. The thing is I got some strange issue in wdio.conf with capabilities when added goog(it was error underscored), but then restarted VScode and it vanished, so now everything is OK. Thank you Sadab

    • @TestAutomationHub
      @TestAutomationHub  Před 3 lety

      @@alexsoft5260 restart sometimes does magic

  • @sharmavinayrocks
    @sharmavinayrocks Před 3 lety

    Thank you for this ☺️

    • @sharmavinayrocks
      @sharmavinayrocks Před 3 lety

      Sir.. one last thing how to wait dynamically for the file to get downloaded instead of hard pause.

    • @TestAutomationHub
      @TestAutomationHub  Před 3 lety

      @@sharmavinayrocks I am still exploring option for that. as it gets downloaded in machine it is bit tricky. One way I can think of is use waituntill and length of files in greater than 0 (should work only when we delete directory after each execution)

    • @sharmavinayrocks
      @sharmavinayrocks Před 3 lety +1

      Yes correct. I got some idea... Thank you so much

  • @shobanadevi5517
    @shobanadevi5517 Před 5 měsíci

    Since we are deleting downloads folder at end, what if there are tests running in parallel calling the same method? Will it be be affected? Please help with your reply

    • @TestAutomationHub
      @TestAutomationHub  Před 3 měsíci

      Good point. Yet to explore but as these validations are minimal i doubt we will have conflict. We can write download, validate and delete in same step to avoid any conflict.

  • @kirandeepkaur6643
    @kirandeepkaur6643 Před 2 měsíci

    If I want to delete just the file but not folder, then what will I pass instead of folder name?

    • @TestAutomationHub
      @TestAutomationHub  Před 2 měsíci

      You need to different method like fs.unlink. Just google ‘delete file with nodejs’ and you will get good examples

    • @kirandeepkaur6643
      @kirandeepkaur6643 Před 2 měsíci

      @@TestAutomationHub ok sure 👍

  • @debarunbiswas3247
    @debarunbiswas3247 Před měsícem

    Hi Sadab thank you for expansion, I am unable to download file in specified location, is there any specific setting we need to do in remote machine?

  • @sharmavinayrocks
    @sharmavinayrocks Před 3 lety

    Sir, Could you please make a video on file download functionality on Jenkins using Same WebdriverIO Code

    • @TestAutomationHub
      @TestAutomationHub  Před 3 lety

      Hi Vinay, call me by name than calling Sir. About Jenkins I haven't got a chance set up due to system constraint. But no matter where you run this code it will always keep the file inside project defined folder so it should work in Jenkins as well (not very sure though). If required connect with me on LinkedIn and will look into.

    • @sharmavinayrocks
      @sharmavinayrocks Před 3 lety +1

      @@TestAutomationHub thank you so much for replying. I tried many things but it dint work with Jenkins internally it spins docker. I will connect with you on LinkedIn and discuss further.
      Thanks a lot..