1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Automating a browser...do I need to learn a scripting language to automate the browser?

Discussion in 'General Programming Chat' started by simpleonline1234, Jan 27, 2011.

  1. simpleonline1234

    simpleonline1234 Junior Member

    Joined:
    Jan 26, 2010
    Messages:
    169
    Likes Received:
    13
    Learning C# and wanting to automate a browser to navigate several sites at once....what should I learn from this point to start this project up?

    Is there some sort of C# scripting language or something.


    Thanks
     
  2. Monrox

    Monrox Power Member

    Joined:
    Apr 9, 2010
    Messages:
    615
    Likes Received:
    579
    Scripting would be wrong here, you are learning an actual language. What you need is called DOM. It describes the structure of every html document. The document contains elements which in turn contain other elements. You can loop through the elements until you find the one that is important to you and then manipulate it like filling it with text, clicking on it etc.

    HEre's a tutorial on how to automate google searches:
    http://www.farooqazam.net/c-sharp-auto-click-button-and-auto-fill-form/
     
    • Thanks Thanks x 1
  3. hatemachine

    hatemachine Regular Member

    Joined:
    Jan 14, 2011
    Messages:
    271
    Likes Received:
    1,138
    Monrox is right. However I would suggest you looking into the HttpWebRequest & HttpWebResponse classes if you plan to use .NET. With those classes you can make a powerful bot for every site you want.