Automate file upload with form fields to third party webpage from c# desktop application
$500-1000 USD
进行中
已发布大约 13 年前
$500-1000 USD
货到付款
This is the spec. It is not subject to change. Please bid and reply only to meet the spec. Please contact us only if you have done this type of work before in c# using HttpWebRequest.
We need a **c# program**, called "helper" in this example, that will use **HttpWebRequest (aka .NET WebRequest)** object to submit form fields, including multiple file uploads to web forms and navigate between them. The class which must be instantiated with an initial connection to the website. It must maintain session between posts. It must also support client credentials. It should have two public methods Submit and Goto.
**Public string Submit(string url, ElementValuesCollection elementValues)** returns the response to the post request. ElementValuesCollection is a collection of ElementValues which is a class with the string properties Name, Value, and Type representing the values of the HtmlElement to be set. This class will also have a Byte[] Data property. The Data property will hold the bytes of the file to be uploaded in the event the Type="file" but this property will be set inside the Submit method. The calling program will only ever assign the string values.
**Public string Goto(string url) ** returns the response for a request.
**Public ElementValuesCollection GetElements()** will populate the ElementsValueCollection with all the HtmlElements on the "current" page. (The page after a Goto) These elements will be limited to specific types such as input, select, text, ahref, etc.
Helper class constructors will include **Helper(string url)** and **Helper(string url, X509Certificate clientCertificate)**