I've got an external running web application, in which I need to fill many textboxes with different values.
The textboxes seem to be in a Flash application.
But I cannot find the textboxes. So far I could get the browser and the document in it, with this, but I have no idea about the elements' names or ids. I need to search them in order to identify them.
using SHDocVw;
using mshtml;
private const string AppURL = @"https://Application.html";
static void Main(string[] args)
{
InternetExplorer IE;
if (GetApp(out IE))
{
HTMLDocumentClass Doc = (HTMLDocumentClass)IE.Document;
}
Console.WriteLine("Programa encerrado, aperte qualquer tecla para sair");
Console.ReadKey();
}
private static bool GetApp(out InternetExplorer Result)
{
Result = null;
int AppCount = 0;
ShellWindows Wins = new ShellWindows();
foreach (InternetExplorer IE in Wins)
{
if (IE.LocationURL == AppURL)
{
AppCount++;
Result = IE;
}
}
if (AppCount == 0)
Console.WriteLine("Running App wasn't found");
else if (AppCount > 1)
Console.WriteLine("There is more than one App running");
else
return true;
return false;
}
}