How To Upload Files In Playwright With JavaScript

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ต.ค. 2024
  • You can upload single files or multiple files in playwright using setInputFiles() method.
    Syntax
    await page.locator("#file-upload").setInputFiles("./upload/image1.png")

ความคิดเห็น • 10

  • @sanjeevaRayudu-r4d
    @sanjeevaRayudu-r4d 6 ชั่วโมงที่ผ่านมา

    Hi Sir , Can you please help me on this How to download file with specific file names?

  • @riashahmistry9552
    @riashahmistry9552 ปีที่แล้ว +1

    For the thing that I am working on, the button does not have type as "file" and when you click on the button.. the file chooser opens.
    Also I noticed that there is a text field on the side which has type= file... but the text field is not clickable so no file chooser opens.
    Any solution to this?

  • @sanjeev8720
    @sanjeev8720 12 วันที่ผ่านมา +1

    Hi sir ..can you please tell how to upload fle when we dont have input tag is file or fileupload

    • @Mukeshotwani
      @Mukeshotwani  11 วันที่ผ่านมา

      Hi Sanjeev I have explained the same in Java way. Same method is available in JS as well th-cam.com/video/opwkGey6kIw/w-d-xo.html

  • @nirmaladevinimmi4720
    @nirmaladevinimmi4720 11 วันที่ผ่านมา +1

    Hello Sir, can we download file without input tag and can we give specific name to download files instead of hashcode name

    • @Mukeshotwani
      @Mukeshotwani  11 วันที่ผ่านมา

      Hi Nirmal, I have explained the same in Java way. Same method is available in JS as well th-cam.com/video/opwkGey6kIw/w-d-xo.html

  • @Priteshpatil-f3g
    @Priteshpatil-f3g 3 หลายเดือนก่อน +1

    Hello Sir
    Could you please suggest me how to upload Image on profile picture section?? using Playwright framework?

    • @Mukeshotwani
      @Mukeshotwani  2 หลายเดือนก่อน

      I have explained the same. What issues u r facing?

  • @arunasavyasachi5617
    @arunasavyasachi5617 ปีที่แล้ว +1

    Thank you so much 😊