0

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;
    }

}
John Saunders
  • 160,644
  • 26
  • 247
  • 397
Daniel Möller
  • 84,878
  • 18
  • 192
  • 214
  • 1
    `The textboxes seem to be in a Flash application.` Well you're kinda screwed. Internet Explorer doesn't know about those text boxes. They won't have ID's in the HTML because they aren't defined in the HTML. The Flash Plugin handles those. You'd need a Flash plugin for your application and I doubt Adobe has time to develop one for you. – mason Sep 29 '14 at 18:53
  • You need to find out the programming language for that web application. – Tianyun Ling Sep 29 '14 at 18:56
  • I could manage something with 'mouse_event' and 'sendkeys', but the browser gets slower and slower until it can't stand anymore. Anyone knows why it gets slower (even working manually) and how to avoid it? – Daniel Möller Sep 29 '14 at 18:56

0 Answers0