//this is the test code generated by selenium //****Paste test script here***** public override void RunTest() { selenium.Open(base.baseURL); Update_XML.WriteXML("DNX9980_XML"); //quality.SetSpeed("1300"); quality.AreEqual("Garmin Product Updates for Kenwood", quality.GetTitle()); quality.Click("css=a.button > span"); quality.WaitForPageToLoad("30000"); ken.DeviceSelectionPage(); //comment: Select the same device like the one from the XML quality.Select("id=headUnitRegionFilter", "label=All"); quality.WaitForPageToLoad("30000"); quality.Select("id=headUnitRegionFilter", "label=North America"); quality.WaitForPageToLoad("30000"); quality.Click("link=DNX9980HD"); quality.WaitForPageToLoad("30000"); ken.ModelIdentificationPage(); //comment: click on "Read Media" button quality.Click("css=a.button > span"); quality.WaitForPageToLoad("30000"); quality.AreEqual("Scan Portable Media", quality.GetTitle()); if (ken.CheckForTimeOut("Media Scan", "css=div.titleHeader-text", 61)) { failedcheck++; } quality.AreEqual("Media Scan", quality.GetText("css=div.titleHeader-text")); quality.AreEqual("Scanning Your Portable Storage Device... Please wait", quality.GetText("id=messageText")); ken.DeviceInformationFoundPage(true); // comment: Click on the "Continue" button quality.Click("css=a.button > span"); quality.WaitForPageToLoad("30000"); ken.ProductUpdatesPage(true); // comment: Click on "Lates map" button quality.Click("css=div.description > span"); quality.WaitForPageToLoad("30000"); ken.LatestMapForKenwoodPage(true); //comment: Click on "Add to Cart" button quality.Click("css=a.button.left > span"); quality.WaitForPageToLoad("30000"); ken.UpdateRequieredPage(); //comment: Click on the "Scan Portable Media" quality.Click("link=Scan Portable Media"); quality.WaitForPageToLoad("30000"); quality.AreEqual("Model Identification", quality.GetTitle()); quality.AreEqual("The model you selected requires identification using portable media", quality.GetText("css=div.titleHeader-text")); // comment: Click on the "Continue" button quality.Click("css=a.button > span"); quality.WaitForPageToLoad("30000"); quality.AreEqual("Scan Portable Media", quality.GetTitle()); if (ken.CheckForTimeOut("Media Scan", "css=div.titleHeader-text", 61)) { failedcheck++; } quality.AreEqual("Media Scan", quality.GetText("css=div.titleHeader-text")); quality.AreEqual("Scanning Your Portable Storage Device... Please wait", quality.GetText("id=messageText")); for (int second = 0; second < 61; second++) { if (second >= 60) { quality.ErrorReport("timeout", CheckType.Warning); } try { if ("Device Information Found" == quality.GetText("css=div.titleHeader-text")) { break; } } catch (Exception) { } Thread.Sleep(1000); } quality.AreEqual("Device Found", quality.GetTitle()); quality.AreEqual("Device Information Found", quality.GetText("css=div.titleHeader-text")); // comment: Click on the "Continue" button quality.Click("css=a.button > span"); quality.WaitForPageToLoad("30000"); quality.IsTrue(Regex.IsMatch(quality.GetTitle(), "Product Updates for Kenwood .*")); quality.IsTrue(Regex.IsMatch(quality.GetText("css=div.titleHeader-text"), "Product Updates for Kenwood .*")); // comment: Click on "Lates map" button quality.Click("css=div.description > span"); quality.WaitForPageToLoad("30000"); quality.AreEqual("Download: City Navigator® North America NT 2012 Map Update for Kenwood", quality.GetTitle()); quality.IsTrue(Regex.IsMatch(quality.GetText("css=div.titleHeader-text"), "(DNX|KNA-)(\\d{4})(.*)")); //comment: Click on "Add to Cart" button quality.Click("css=a.button.left > span"); quality.WaitForPageToLoad("30000"); ken.UpdateRequieredPage(); //comment: CLick on "Software Updates" link quality.Click("link=Software Updates"); Thread.Sleep(2000); quality.SelectWindow("Software Update"); quality.AreEqual("Software Update", quality.GetText("css=div.titleHeader-text")); quality.AreEqual("Kenwood Receiver Software for DNX9980HD", quality.GetText("css=p.header")); quality.AreEqual("« Back to Updates", quality.GetText("css=a.button > span")); quality.AreEqual("Get Latest Navigation Software", quality.GetText("css=div.softwareUpdate > a.button > span")); }