tags:

views:

123

answers:

2

Programatically insert values to a webpage. for eg. I have web page where i have created to two text box and one command button. when i click the button. it compares two value of the textbox. and throws a message "hello". to accomplish this job i want to open the webpage type the values press the button bla bla..

but i want to accomplish this job via a windows application which will insert the value to the controls automatically.

A: 
cichy
+1  A: 

As you mentioned in a comment that this is for testing a web page you might want to have a look at available Web testing tools:

I don't know for sure what further recommendations to give to you as the context is not clear to me. For example, Selenium comes with a macro recorder, which gets you easily started with simple tests, Watin allows you to program the tests using .NET:

[Test]
public void SearchForWatiNOnGoogle()
{
    using (var browser = new IE("http://www.google.com"))
    {
        browser.TextField(Find.ByName("q")).TypeText("WatiN");
        browser.Button(Find.ByName("btnG")).Click();

        Assert.IsTrue(browser.ContainsText("WatiN"));
    }
} 
0xA3
This is not working
Krish
@Krish: "This is not working" does not say much. *How* is it not working and what kind of error do you get? It is *always* important on a forum like SO to mention these details, keep that in mind for your future questions. Jon Skeet has written up some guidelines that will help you to improve your questions and comments: http://tinyurl.com/so-hints.
0xA3