Read a XML test data in Java

Here is the code to read the xml test data coded in Java. import; import; import; import; import java.util.Enumeration; import java.util.Properties; public class ReadXmlData { public String value; public String data(String node) { try { File file = new File(“../TestData.xml”); // XML file path FileInputStream fileInput = new FileInputStream(file); Properties properties […]

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); […]