Step Helper for Web UI Testing with WatiN

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.

ASP.NET MVC 3 Web Application Project Template

ASP.NET MVC 3 is a framework for building scalable, standards-based web applications using well-established design patterns and the power of ASP.NET and the .NET Framework.

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.

http://www.asp.net/mvc/mvc3


Getting Started with WatiN

Here’s a code snippet to start testing with WatiN. Got it from the WatiN web site.

using System;
using WatiN.Core;

namespaceWatiNGettingStarted
{
  class WatiNConsoleExample
  {
    [STAThread]
    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.
      ie.TextField(Find.ByName(“q”)).TypeText(“WatiN”);
      // Click the Google search button.
      ie.Button(Find.ByValue(“Google Search”)).Click();
      // Uncomment the following line if you want to close
      // Internet Explorer and the console window immediately.
      //ie.Close();
    }
  }
}


Create Log file and attach Data file in SQL Server

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 ;



	

Silverlight 4 Tools for Microsoft Visual Web Developer 2010 Express

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:
 
http://go.microsoft.com/fwlink/?LinkId=168436