Hello I have problem with select file to upload in a WebBrowser
, I try do this like that:
var elements = webBrowser1.Document.GetElementsByTagName("input");
foreach (HtmlElement file in elements)
{
if (file.GetAttribute("type") == "file")
{
file.Focus();
file.InvokeMember("click");
Thread.Sleep(2000);
IntPtr fileDownloadDialogPointer = FindWindow(null, "select file dialog");
SetForegroundWindow(fileDownloadDialogPointer);
//SendKeys.SendWait("text");
InputSimulator.SimulateTextEntry("text");
}
}
but this isnt working. How to fix it? I want to insert text in field in Select File Dialog.