If you have tried to user WatiN tests to set the value of text boxes/fields, you likely have run into a few things.
First, this...
ie.TextField("ID").Value = "some text";
is much faster than this...
ie.TextField("ID").TypeText("some text");
Next, if you are using client side validation or any of the MaxkedEdit controls, you probably discovered that it does not play too well. I originally used this just to make it work for me...
TextField textField = ie.TextField(Find.ById(new Regex(controlId)));
textField.Focus();
for (int i = 0; i < value.Length; i++)
{
textField.KeyPress(char.Parse(value.Substring(i, 1)));
textField.WaitForComplete();
}
For one, it is pretty slow. Also, it just does not seem to work 100% of the time. WatiN exposes one additional method to make this a lot faster. Eval() will allow you to inject and run javascript in the instance of the browser..
TextField textField = ie.TextField(Find.ById(new Regex(controlId)));
string eval = string.Format("document.getElementById('{0}').value = '{1}'", textField.Id, value);
ie.Eval(eval);
Happy Testing!