This will be a helper class when testing Web applications with different WatiN Features and StepDefinition classes.
You can get the browser object from anytime from this class and it will be useful when testing with lot of features and step definitions.
However only the MVC 2 Web Application Project Template is available with Visual Web Developer 2010 Express initially and you have to download MVC 3 from following link and install it in order to get ASP.NET MVC 3 Web Application Project Template on VS Express.
Here’s a code snippet to start testing with WatiN. Got it from the WatiN web site.
static void Main(string args)
// Open a new Internet Explorer window and
// goto the google website.
IE ie = new IE(http://www.google.com);
// Find the search text field and type Watin in it.
// Click the Google search button.
// Uncomment the following line if you want to close
// Internet Explorer and the console window immediately.
Follow one of these methods to test popup web pages using WatiN.
//after the click that opens the popup:
IE iepopup_1 = IE.AttachToIE(Find.ByUrl(theUrlOfThePopup));
//operate on iepopup_1
IE poppedUpBrowser = IE.AttachTo(Find.ByUrl(“http://www.popped-up-site.co.uk/”));
You can attach a SQL Server data file(.mdf) which has no log file(.ldf) associate with the data file.
Use the following SQL Query with the correct path of the data file.
CREATE DATABASE MyDB
ON (FILENAME = ‘C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\MyDB_Data.mdf’) — change the drive and file path
FOR ATTACH_REBUILD_LOG ;
The basic Microsoft Visual Web Developer 2010 Express does not contain Silverlight 4 tools and following is an update to Microsoft Visual Web Developer 2010 Express is required to support the targeted version of Silverlight.
Download the Visual Studio update at: