Watin automated web testing in .net

Posted on 2012-08-17
Last Modified: 2012-09-04

  I am trying to setup an automated web testing framework, using Watin, for my .net web application . To get started, I created an C# console application with the sample code they have given in the Below is the C# code.

class Program
        static void Main(string[] args)

        public static void GetGoogle()
            using (var browser = new IE(""))

                bool test = browser.ContainsText("Watin");

                string test4 = "";

Open in new window

When I ran this code, it opens the in IE browser. However, it does not click the search button. I also tried with Find.ByValue("Google Search"), but it doesn't click the button.

What am I doing wrong here?

- Vishnu
Question by:kvishnusharma
    1 Comment
    LVL 16

    Accepted Solution


    "Google Search" Button Name is btnK

    try like below.



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
    Recently I spent hours debugging an issue in a Rails project where ActiveRecord was causing MySQL errors trying to create a User object of a class at the top level of a Single Table Inheritance model structure.  It turns out `.create` behaves differ…
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now