Forum Discussion

danclay's avatar
danclay
New Contributor
8 years ago
Solved

HTTP post a file

Hello! I am currently using Test Complete 11 and working with a web application that can be updated via sending a file to a server. I was hoping to automate this process but having trouble figuring out how to do so. I have previously been posting strings/json using MSXML but unsure how to send a file. Any advice would be greatly appreciated!

  • Hi,

     

    You may either use some tool like Fiddler to record the traffic from your application to the server when the application sends a file and implement it then in code or consult with developers about what server expects from the application.

    As a possible example, the code may look like this: http://fm4dd.com/programming/shell/microsoft-vbs-https-upload.htm

4 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    You may either use some tool like Fiddler to record the traffic from your application to the server when the application sends a file and implement it then in code or consult with developers about what server expects from the application.

    As a possible example, the code may look like this: http://fm4dd.com/programming/shell/microsoft-vbs-https-upload.htm

  • What scripting language are you using?

     

    Answers are likely to vary depending on that ...

      • Colin_McCrae's avatar
        Colin_McCrae
        Community Hero

        I'm mainly a VBScript guy so suspect I'm not going to be much help here.

         

        How do the files normally get sent to the server? Assuming it's something the user can do, how do they normally do it?

         

        A form in an application somewhere? FTP? How you do it is likely to depend on what the server is set up to actually accept ...