I'm using WatiN testing tool. Can I pass a key stroke (i.e., pressing a enter key) to the application using WatiN scripts?
This option was available in WatiR. Is this option available in WatiN?
EDIT: Upon further inspection, I found that the standard way of sending the ENTER key doesn't work in WatiN as it does in WatiR. You need to use System.Windows.Forms.SendKeys
Also, I recommend that you download the WatiN Test Recorder.
Here's the sample code.
using(IE ie = new IE("http://someurl"))
{
TextField myTxt = ie.TextField(Find.ById("myTextBox")).TypeText("some value");
System.Windows.Forms.SendKeys.SendWait("{ENTER}");
}