TFS Visual Studio 2010 and Excel Integration TF80070 error – Selenium Excel Test Data

I am using Excel to store the test data and use Visual Studio 2010 C# to code the selenium scripts. When running the scripts I was getting the TF80070 error. I had to click on the confirmation box to continue testing. So it when from automation testing to manual testing (because of the error message). […]

Verifying the canonical tag on a web page using Selenium GetLocation

Here is an example to verify the canonical tag on a web page using Selenium GetLocation. The selenium script is written in C# public int CheckCanonicalTag() { int resultcount = 0; string URL = selenium.GetLocation(); if (selenium.IsElementPresent(“//link[@rel=’canonical’ and @href='” + System.Web.HttpUtility.UrlDecode(URL) + “‘]”)) { Console.WriteLine( “Canonical tags is present on the page :” + URL); […]

Using Selenium in a Ajax web application

On an Ajax web application or Ajax feature on web page small sections of the page will update and often the entire webpage will not load. It’s necessary to wait until this ajax process is completed before interacting with sections of the page where content or controls are yet to be rendered. The Ajax application […]

Removing other’s workspace in TFS:

A common scenario while using a system used by some one else who earlier used the same TFS workspace. You need to be either the owner of the workspace or have the Administer workspaces permission on the Team Foundation Server to perform this. Open Visual studio Command prompt at C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC […]

Comparing Dates in C# , selenium RC

Example to convert string to date time variable and also compare two date time variable. string Firstdate = selenium.GetText(FirstDate_xp); string Nextdate = selenium.GetText(Nextdate_xp); DateTime date1 = Convert.ToDateTime(Firstdate); DateTime date2 = Convert.ToDateTime(Nextdate); int result = DateTime.Compare(date1, date2); //Compare function returns //0 if both dates are equal //1 if date1 is recent than date2 //-1 if date2 […]