C# 通过Webbrowser winforms自动填写网络表单(日期字段)
我正在通过www.irctc.co.in自动化订票流程 到现在为止我可以登录了。。但在下一个表单中指定机票详细信息时,我无法使用文本框值设置旅程日期字段日历 我试过这个C# 通过Webbrowser winforms自动填写网络表单(日期字段),c#,winforms,browser,autofill,datefield,C#,Winforms,Browser,Autofill,Datefield,我正在通过www.irctc.co.in自动化订票流程 到现在为止我可以登录了。。但在下一个表单中指定机票详细信息时,我无法使用文本框值设置旅程日期字段日历 我试过这个 wb.Document.GetElementById("stationFrom").SetAttribute("value", "testStation"); wb.Document.GetElementById("stationTo").SetAttribute("value","testaga
wb.Document.GetElementById("stationFrom").SetAttribute("value", "testStation");
wb.Document.GetElementById("stationTo").SetAttribute("value","testagain");
wb.Document.GetElementById("JDatee1").InvokeMember("onfocus");
wb.Document.GetElementById("JDatee1").SetAttribute("value", "05/31/2012");
wb.Document.GetElementById("JDatee1").SetAttribute("CurrentDate", "31");
wb.Document.GetElementById("JDatee1").SetAttribute("CurrentMonth", "05");
wb.Document.GetElementById("JDatee1").SetAttribute("CurrentYear", "2012");
wb.Document.GetElementById("JDatee1").InvokeMember("onblur");
But after submitting form, date field gets the today's date..
Rest of the field I am able to fill..