//this is the test code generated by selenium
        //****Paste test script here*****
        public override void RunTest()
        {
            Update_XML.XMLEdit("SoftwareVersion", "429");

            //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=DNX7180");
            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"));

            if (ken.CheckForTimeOut("Device Information Found", "css=div.titleHeader-text", 61))
            {
                failedcheck++;
            }

            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 DNX7180", 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"));

            //updateXML.WriteXML("DNX7180_XML");
        }
        //this is the test code generated by selenium
        //****Paste test script here*****
        public override void RunTest()
        {
            Update_XML.XMLEdit("Id", "3422110115");

            selenium.Open(base.baseURL);
            quality.AreEqual("Garmin Product Updates for Kenwood", quality.GetTitle());
            quality.Click("link=Sign In");
            quality.WaitForPageToLoad("30000");

            quality.AreEqual("Sign In", quality.GetTitle());

            ken.Login(username, password, fullname, false);

            //comment: Click on "Update" button from the "Product Updates" panel
            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=Europe");
            quality.WaitForPageToLoad("30000");
            quality.Click("link=DNX7220");
            quality.WaitForPageToLoad("30000");

            /*
             * ken.ModelIdentificationPage(quality);
             *
             * //comment: click on "Read Media" button
             * quality.Click("css=a.button > span");
             * quality.WaitForPageToLoad("30000");
             * quality.AreEqual("Scan Portable Media", quality.GetTitle());
             *
             * for (int second = 0; ; second++)
             * {
             *  if (second >= 60) quality.Fail("timeout");
             *  try
             *  {
             *      if ("Media Scan" == quality.GetText("css=div.titleHeader-text")) break;
             *  }
             *  catch (Exception)
             *  { }
             *  Thread.Sleep(1000);
             * }
             *
             * 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(quality, true);
             *
             * // comment: Click on the "Continue" button
             * quality.Click("css=a.button > span");
             * quality.WaitForPageToLoad("30000");
             */

            ken.ProductUpdatesPage(true);

            /*
             * // comment: Click on "Latest Map" button
             * quality.Click("css=div.description > span");
             * quality.WaitForPageToLoad("30000");
             *
             * //comment: Check the "Latest Map for Kenwood"
             * ken.LatestMapForKenwoodPage(quality);
             */

            // comment: Click on "Real-Time Traffic" button
            quality.Click("//div[@id='productUpdates']/a[2]/div/div/div");
            quality.WaitForPageToLoad("30000");

            //comment: Check the "Traffic subscription for Kenwood"
            ken.TrafficSubscriptionPage();

            //comment: Click on the first traffic subscription (North America)
            quality.Click("css=div.text");
            quality.WaitForPageToLoad("30000");

            ken.TrafficServicesForkenwoodPage();

            //comment: Click "Add to Cart" button without beeing logged-in
            quality.Click("css=a.button.left > span");
            quality.WaitForPageToLoad("30000");

            //comment: Validate the "Add to Cart: Traffic Subscription" page
            ken.AddToCartTrafficVerification(true);

            quality.Type("id=unitId", "3422110115");
            quality.Click("//form[@id='verifyTrafficForm']/table/tbody/tr[5]/td/a[2]/span");

            quality.WaitForPageToLoad("30000");

            //ken.ShoppingCartWithLatestMapToBuy(quality);
            ken.ShoppingCartWithTrafficSubscriptionToBuy(true);

            // comment: Click the "Checkout" button
            quality.Click("//form[@id='shoppingCartForm']/div[2]/div[4]/a[2]/span");
            quality.WaitForPageToLoad("30000");

            ken.CheckOutPage();

            // comment: Update the Shipping address fields

            ken.Checkout("FirstName Tester", "LastName Tester", "label=United States",
                         "AddressLine1 tester's address", "AddressLine2 tester's address", "HILO",
                         "label=Hawaii", "96720", "000-555-1212");

            // comment: Check that the "Billing Address" page is displayed

            /*
             * if (ken.CheckForTimeOut("Edit","link=Edit", 61))
             * {
             *  failedcheck++;
             * }
             */

            ken.BillingAddressSection();

            ken.PaymentInformationSection();

            DateTime time = DateTime.Now;

            //string current_year = time.Year.ToString();
            string year_builder = "";

            for (int i = 0; i < 16; i++)
            {
                if (i <= 14)
                {
                    year_builder += time.AddYears(i).Year.ToString() + " ";
                }
                else
                {
                    year_builder += time.AddYears(i).Year.ToString();
                }
            }

            quality.AreEqual(year_builder, quality.GetText("id=expYear"));

            //decrease speed of execution
            selenium.SetSpeed("1000");

            quality.Select("name=cardType", "label=Master Card");
            quality.Select("name=cardType", "label=Visa");

            // comment: Complete Purchase workflow
            quality.Select("name=cardType", "label=Discover");
            quality.Type("id=cardHolderName", "holder name");
            quality.Type("id=cardNumber", "6011111111111117");
            quality.Type("id=cardSecurityCode", "123");
            quality.Select("id=expMonth", "label=03");
            quality.Select("id=expYear", "label=2021");

            //comment: Click on "Place Secure Order" button
            quality.Click("id=submitOrder");

            quality.WaitForPageToLoad("30000");
            Thread.Sleep(10000);
            // comment: Validate the Purchase Details

            /*
             * for (int second = 0; second < 61 ; second++)
             * {
             *  if (second >= 60) quality.ErrorReport("timeout" , CheckType.Warning);
             *  try
             *  {
             *      if (quality.IsTextPresent("Order Summary")) break;
             *  }
             *  catch (Exception)
             *  { }
             *  Thread.Sleep(1000);
             * }
             */

            quality.AreEqual("Order Summary", quality.GetTitle());
            quality.AreEqual("Order Summary", quality.GetText("css=div.titleHeader-text"));
            quality.AreEqual("Order Receipt:", quality.GetText("css=div.header"));

            string inputString = quality.GetText("css=strong");

            /*
             * Match match = Regex.Match(inputString, @"Order\s\#\:\s\d{12}", RegexOptions.IgnoreCase);
             *
             * if (match.Success)
             * {
             *  quality.True(true);
             * }
             */
            //quality.IsTrue(quality.IsTextPresent("Order Date: February 6, 2012 8:06:48 AM EST"));
            //quality.IsTrue(quality.IsTextPresent("Total: $69.99"));
            quality.IsTrue(quality.IsTextPresent("Status: Order Placed"));
            quality.AreEqual("Payment Method:", quality.GetText("//div[@id='bd']/div[3]/div/div[2]/div"));

            string cardName_number = quality.GetText("//div[@id='bd']/div[3]/div/div[2]/div[2]");

            /*
             * Match match1 = Regex.Match(cardName_number, @"\w{4}\s*.*\d{4}", RegexOptions.IgnoreCase);
             *
             * if (match1.Success)
             * {
             *  quality.True(true);
             * }
             */

            //quality.IsTrue(Regex.IsMatch(quality.GetText("//div[@id='bd']/div[3]/div/div[2]/div[2]"), "^VISA ************1111$"));
            quality.AreEqual("Billed To:", quality.GetText("//div[@id='bd']/div[3]/div[2]/div/div"));
            quality.IsTrue(quality.IsTextPresent("FirstName Tester LastName Tester"));
            quality.IsTrue(quality.IsTextPresent("AddressLine1 tester's address"));
            quality.IsTrue(quality.IsTextPresent("AddressLine2 tester's address"));
            quality.IsTrue(quality.IsTextPresent("HILO, HI"));
            quality.IsTrue(quality.IsTextPresent("US"));
            quality.IsTrue(quality.IsTextPresent("96720"));
            quality.IsTrue(quality.IsTextPresent("000-555-1212"));
            quality.AreEqual("Shipped To:", quality.GetText("//div[@id='bd']/div[3]/div[2]/div[2]/div"));
            quality.IsTrue(quality.IsTextPresent("FirstName Tester LastName Tester"));
            quality.IsTrue(quality.IsTextPresent("AddressLine1 tester's address"));
            quality.IsTrue(quality.IsTextPresent("AddressLine2 tester's address"));
            quality.IsTrue(quality.IsTextPresent("HILO, HI"));
            quality.IsTrue(quality.IsTextPresent("US"));
            quality.IsTrue(quality.IsTextPresent("96720"));
            quality.IsTrue(quality.IsTextPresent("000-555-1212"));
            quality.AreEqual("My Order:", quality.GetText("css=div.orderDetails > div.header"));
            quality.AreEqual("Item Description", quality.GetText("css=div.text"));
            quality.AreEqual("Unit Price", quality.GetText("css=#price-hd > div.text"));
            quality.AreEqual("Qty", quality.GetText("css=#quantity-hd > div.text"));
            quality.AreEqual("Total", quality.GetText("css=#total-hd > div.text"));

            //quality.AreEqual("City Navigator® North America NT 2012 Map Update for Kenwood Download", quality.GetText("css=span.name"));
            quality.AreEqual("Premium Traffic Subscription - Belgium", quality.GetText("css=span.name"));
            //quality.AreEqual("Item #010-D1207-00", quality.GetText("css=div.partNumber"));
            quality.AreEqual("Item #010-11356-10", quality.GetText("css=div.partNumber"));
            quality.AreEqual("", quality.GetText("css=img.margin-r20"));
            //quality.AreEqual("$69.99", quality.GetText("id=price"));
            //quality.IsTrue(Regex.IsMatch(quality.GetText("id=price"), ".*"));
            //quality.AreEqual("$69.99", quality.GetText("id=total"));
            //quality.IsTrue(Regex.IsMatch(quality.GetText("id=total"), ".*"));
            quality.AreEqual("Subtotal:", quality.GetText("css=div.labels"));
            //quality.AreEqual("$69.99", quality.GetText("css=div.prices.right > div.right"));
            //quality.IsTrue(Regex.IsMatch(quality.GetText("css=div.prices.right > div.right"), ".*"));
            quality.AreEqual("Total Charged:", quality.GetText("css=b"));
            //quality.AreEqual("$69.99", quality.GetText("css=div.right > b"));
            //quality.IsTrue(Regex.IsMatch(quality.GetText("css=div.right > b"), ".*"));

            // comment: Sign Out
            ken.Logout();
        }
        //this is the test code generated by selenium
        //****Paste test script here*****
        public override void RunTest()
        {
            selenium.Open(base.baseURL);
            Update_XML.WriteXML("DNX7180_XML");

            //TheKenwood_ModelTest: DNX4210DAB iD: 1011105504

            Update_XML.XMLEdit("Id", "1011105504");

            selenium.SetSpeed("1300");

            quality.AreEqual("Garmin Product Updates for Kenwood", quality.GetTitle());
            quality.Click("css=a.button > span");
            quality.WaitForPageToLoad("30000");

            ken.DeviceSelectionPage();

            quality.Select("id=headUnitRegionFilter", "label=All");
            quality.WaitForPageToLoad("30000");
            quality.Select("id=headUnitRegionFilter", "label=Europe");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Select a Model", quality.GetTitle());

            //comment: Select the same device like the one from the XML
            quality.Click("link=DNX4210DAB");
            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_NoUpdates();

            // comment: Click on "Real-Time Traffic" button
            quality.Click("css=a.updatesLink > div.productUpdate > div.description > div.header");
            quality.WaitForPageToLoad("30000");

            //comment: Check the "Traffic subscription for Kenwood"
            ken.TrafficSubscriptionPage();

            //comment: Click on the first traffic subscription (North America)
            quality.Click("css=div.text");
            quality.WaitForPageToLoad("30000");

            ken.TrafficServicesForkenwoodPage();

            //comment: Click "Add to Cart" button without beeing logged-in
            quality.Click("css=a.button.left > span");
            quality.WaitForPageToLoad("30000");

            ken.SignInPage();

            quality.Type("id=username", username);
            quality.Type("id=password", password);
            quality.Click("css=a.button");
            quality.WaitForPageToLoad("30000");

            //check if the only the traffic receiver text box is display for this kind of device
            ken.TrafficReceiverOnlyPage();

            //comment:  do not enter any value and press the Continue btn
            quality.Click("//form[@id='verifyTrafficForm']/table/tbody/tr[5]/td/a[2]/span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Add to Cart: Traffic Verification", quality.GetTitle());
            quality.AreEqual("Traffic Receiver ID is required", quality.GetText("css=ul.error > li"));

            //comment: special characters for traffic receiver ID
            quality.Type("id=trafficReceiverId", "!@#$%@@%$$#@!$%#@!!$%$");
            quality.Click("//form[@id='verifyTrafficForm']/table/tbody/tr[5]/td/a[2]/span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Add to Cart: Traffic Verification", quality.GetTitle());
            quality.AreEqual("Please enter a valid Traffic Receiver ID", quality.GetText("css=ul.error > li"));

            //comment: Type string characters for traffic receiver ID
            quality.Type("id=trafficReceiverId", "qweqrrqwerewqrwerweqrqwrwqrwrwq");
            quality.Click("//form[@id='verifyTrafficForm']/table/tbody/tr[5]/td/a[2]/span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Add to Cart: Traffic Verification", quality.GetTitle());
            quality.AreEqual("Please enter a valid Traffic Receiver ID", quality.GetText("css=ul.error > li"));

            //comment: Type invalid values for Traffic Receiver ID
            quality.Type("id=trafficReceiverId", "-1");
            quality.Click("//form[@id='verifyTrafficForm']/table/tbody/tr[5]/td/a[2]/span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Add to Cart: Traffic Verification", quality.GetTitle());
            quality.AreEqual("The Traffic Receiver ID you entered is not valid", quality.GetText("css=ul.error > li"));

            //comment: Type invalid values for Traffic Receiver ID
            quality.Type("id=trafficReceiverId", "-1");
            quality.Click("//form[@id='verifyTrafficForm']/table/tbody/tr[5]/td/a[2]/span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Add to Cart: Traffic Verification", quality.GetTitle());
            quality.AreEqual("The Traffic Receiver ID you entered is not valid", quality.GetText("css=ul.error > li"));

            //comment: Type a valid traffic receiver id which is registered to another user account
            quality.Type("id=trafficReceiverId", unitIdRegistered);
            quality.Click("//form[@id='verifyTrafficForm']/table/tbody/tr[5]/td/a[2]/span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Add to Cart: Traffic Verification", quality.GetTitle());
            quality.AreEqual("This traffic receiver is currently registered to another user account", quality.GetText("css=ul.error > li"));

            //comment: Type a valid valid traffic receiver id
            quality.Type("id=trafficReceiverId", unitIdNotRegistered);
            quality.Click("//form[@id='verifyTrafficForm']/table/tbody/tr[5]/td/a[2]/span");
            quality.WaitForPageToLoad("30000");

            ken.ShoppingCartWithTrafficSubscriptionToBuy(true);

            ken.Logout();
        }