There's an input tag on a website that I want to programmatically upload an image file to. The tag looks like this:
<input type="file" label="upload" ..>
I don't know how to interact with something like this. How would I input a specified image file to that tag?
I have this much:
OpenFileDialog ofd = new OpenFileDialog();
ofd.Title = "Choose Images";
ofd.Filter = "Image files (*.jpg, *.jpeg, *.jpe, *.jfif, *.png) | *.jpg; *.jpeg; *.jpe; *.jfif; *.png";
if (ofd.ShowDialog() == DialogResult.OK)
{
HtmlElementCollection elc = wb.Document.GetElementsByTagName("input");
Image i = Image.FromFile(ofd.FileName);
foreach (HtmlElement el in elc)
{
//Upload file here
}
}