Selenium WebDriver: Upload multiple files

前端 未结 3 437
无人共我
无人共我 2020-12-05 11:52

My test need to upload test files in different browsers (I use WebDriver + Java). For a single file upload, everything works fine. I just send the

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 12:05

    I also get chance to upload multiple files via Selenium.

    Finally get the solution using AutoIT.

    You can pass file path at run time.

    ControlFocus(“File Upload”,””,”Edit1″)
    ControlSetText(“File Upload”,””,”Edit1″,$CmdLine[1])
    ControlClick(“File Upload”,””,”Button1″)
    
    
    Runtime.getRuntime().exec("C:\\Users\\Mukesh_50\\Desktop\\My blog\\AutoIT\\fileUpload3.exe"+" "+"C:\\Users\\Mukesh_50\\Downloads\\VerifyTitle.java");
    

    If finding any issue then check complete article with video.

提交回复
热议问题