HTMLInputFileElement InputFile;
InputFile = (HTMLInputFileElement)doc.all.item((String)H["HtmlName"], 0);
InputFile.focus();
String x = GetValue(H["Value"]);
System.Windows.Forms.SendKeys.SendWait(x);
以上是在網路上看到的一段code,主要用來填入表單中file欄位的值
doc是HTMLDocument
我也是照他這樣寫,不過就一直錯在第二行的型別轉換...
有大大知道為什麼嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.115.126.238