//this is the test code generated by selenium
        //****Paste test script here*****
        public override void RunTest()
        {
            selenium.Open(base.baseURL);
            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=DNX5220");
            quality.WaitForPageToLoad("30000");

            ken.ProductUpdatesPage(true);

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

            //comment: Check the "Latest Map 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();

            ken.SignIn(username, password);

            /*
             * quality.Type("id=username", username);
             * quality.Type("id=password", password);
             * quality.Click("css=a.button");
             * quality.WaitForPageToLoad("30000");
             */
            //comment: Validate the "Add to Cart: Traffic Subscription" page
            ken.AddToCartTrafficVerification(true);

            // comment: Click the "Cancel" button from the "Add to Cart: Traffic Subscription"
            quality.Click("css=a.button > span");
            quality.WaitForPageToLoad("30000");

            ken.TrafficServicesForkenwoodPage();

            ken.Logout();
        }
        //this is the test code generated by selenium
        //****Paste test script here*****
        public override void RunTest()
        {
            selenium.Open(base.baseURL);

            //set speed to lower value
            //selenium.SetSpeed("300");

            ken.WelcomePage();

            quality.Click("link=Sign In");
            quality.WaitForPageToLoad("30000");

            ken.SignInPage();

            // comment: Validate the Create Account page
            quality.Click("css=div.left > a.button > span");
            quality.WaitForPageToLoad("30000");

            // comment: Validate the Create Account page
            ken.CreateAccountPage();

            // comment: Enter valid information
            quality.Type("id=fullName", "full name");
            quality.Type("id=username", "newTestUser" + ken.RandomString(4));
            quality.Type("id=address", "home address");
            quality.Type("id=password", password);
            quality.Type("id=address2", "office address");
            quality.Type("id=retypePassword", password);
            quality.Type("id=city", "my city");
            quality.Select("id=state", "label=Hawaii");

            string random1 = ken.RandomString(4);
            string random2 = ken.RandomString(4);

            quality.Type("id=email", random1 + "." + random2 + "@garmin.com");
            quality.Type("id=retypeEmail", random1 + "." + random2 + "@garmin.com");

            quality.Select("id=country", "label=United States");
            quality.Type("id=zip", "988745");

            quality.Click("//form[@id='createAccountForm']/table/tbody/tr[8]/td/a[2]/span");
            quality.WaitForPageToLoad("30000");

            Thread.Sleep(5000);

            quality.AreEqual("Garmin Product Updates for Kenwood", selenium.GetTitle());
            quality.AreEqual("Welcome full name", selenium.GetText("css=span.margin-lr5"));
            quality.AreEqual("Sign Out", quality.GetText("link=Sign Out"));

            // 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);
            ken.WelcomePage();

            quality.Click("link=Sign In");
            quality.WaitForPageToLoad("30000");

            ken.SignInPage();

            // comment: Log ing with a My Garmin user and password
            ken.Login(username, password, fullname, false);

            // comment: Sign Out
            ken.Logout();
        }
示例#4
0
        //this is the test code generated by selenium
        //****Paste test script here*****
        public override void RunTest()
        {
            selenium.Open(base.baseURL);


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

            ken.SignInPage();

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

            // comment: Check the My Account menu
            quality.Click("link=My Account");
            quality.WaitForPageToLoad("30000");

            ken.MyAccountPage(false);

            // comment: Click on the "View All Orders" button
            quality.Click("//div[@id='bd']/div[6]/a[2]/span");
            quality.WaitForPageToLoad("30000");

            ken.OrderSummary(false);

            // comment: Click on a "Details" button
            quality.Click("css=#view > a.button > span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Order Summary", quality.GetTitle());

            // comment: go to "Order History" web page
            quality.Click("link=Order History");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("My Orders", quality.GetTitle());

            // comment: Go back to My Account
            quality.Click("link=« Back");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Account Settings", quality.GetTitle());

            // 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);
            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 a device
            quality.Click("link=DNX7220");
            quality.WaitForPageToLoad("30000");

            ken.ProductUpdatesPage(true);

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

            //comment: Check the "Latest Map 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");

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

            // comment: Type a Valid Unit ID
            quality.Type("id=unitId", "");
            quality.Type("id=unitId", "3422110080");
            quality.Click("//form[@id='verifyTrafficForm']/table/tbody/tr[5]/td/a[2]/span");
            quality.WaitForPageToLoad("30000");

            ken.ShoppingCartWithTrafficSubscriptionToBuy(true);

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

            ken.ProductUpdatesPage(true);

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

            //comment: Check the "Real traffic Subscription"
            ken.TrafficSubscriptionPage();

            //comment: Click on the first traffic subscription
            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);

            // comment: Type a Valid Unit ID
            quality.Type("id=unitId", "");
            quality.Type("id=unitId", "3422110080");
            quality.Click("//form[@id='verifyTrafficForm']/table/tbody/tr[5]/td/a[2]/span");
            quality.WaitForPageToLoad("30000");

            ken.ShoppingCartWithTrafficSubscriptionToBuy(false);

            ken.Logout();
        }
        //this is the test code generated by selenium
        //****Paste test script here*****
        public override void RunTest()
        {
            selenium.Open(base.baseURL);

            ken.WelcomePage();

            quality.Click("link=Sign In");
            quality.WaitForPageToLoad("30000");

            // comment: Validate the Sign In page
            ken.SignInPage();

            // comment: Forgot Username
            quality.Click("link=Forgot username");
            quality.WaitForPageToLoad("30000");

            ken.ForgotUsernamePage();

            // comment: Click the "Product Support"
            quality.Click("link=Product Support.");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Support", quality.GetTitle());

            quality.Click("link=Sign In");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Sign In", quality.GetTitle());
            quality.Click("link=Forgot username");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Forgot Username", quality.GetTitle());

            // comment: Click submit with out entering
            quality.Click("css=a.button > span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Forgot Username", quality.GetTitle());
            quality.AreEqual("E-mail Address is required", quality.GetText("css=ul.error > li"));

            // comment: Enter a invalid email address
            quality.Type("id=email", "sadsddsdsdsadsdsadsdsdsdsdsdsad");
            quality.Click("css=a.button > span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Forgot Username", quality.GetTitle());
            quality.AreEqual("E-mail Address is invalid", quality.GetText("css=ul.error > li"));

            // comment: Enter more than 50 characters as an invalid email address
            quality.Type("id=email", "as!@#!@# 21sasdasdasadasdadaaasdadassasdasdasadasdadaaasdad\\");
            quality.Click("css=a.button > span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Forgot Username", quality.GetTitle());
            quality.AreEqual("The maximum length of E-mail Address is 50 characters", quality.GetText("css=ul.error > li"));
            quality.AreEqual("E-mail Address is invalid", quality.GetText("//div[@id='bd']/div[3]/ul/li[2]"));

            // comment: Enter a non existing email address
            quality.Type("id=email", "*****@*****.**");
            quality.Click("css=a.button > span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Forgot Username", quality.GetTitle());
            quality.AreEqual("Unable to find your account information in our records", quality.GetText("css=ul.error > li"));

            // comment: Enter a valid email
            quality.Type("id=email", "*****@*****.**");
            quality.Click("css=a.button > span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Forgot Username", quality.GetTitle());
            quality.AreEqual("We have sent your username to your email address.", quality.GetText("css=div.confirmationDialog-mid"));
        }
示例#7
0
        //this is the test code generated by selenium
        //****Paste test script here*****
        public override void RunTest()
        {
            //set speed to lower value
            selenium.SetSpeed("300");

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

            ken.SignInPage();

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

            // comment: Check the My Account menu
            quality.Click("link=My Account");
            quality.WaitForPageToLoad("30000");

            ken.MyAccountPage(false);

            // comment: Click on the "View Subscription" button
            quality.Click("//div[@id='bd']/div[6]/a/span");
            quality.WaitForPageToLoad("30000");

            ken.ViewSubscriptionsPage(false, true);

            //comment: Click on the first FOUND UnlockCode button
            bool check = false;

            if (quality.GetText("css=#button > a.button > span") == "Unlock Code")
            {
                quality.Click("css=#button > a.button > span");
                quality.WaitForPageToLoad("30000");
            }
            else if (quality.IsElementPresent("//div[@id='mySubscriptions']/div[2]"))//(quality.IsElementPresent("//div[" + 4 + "]/div[3]/a/span"))
            {
                int i = 2;
                while (!check && (quality.IsElementPresent("//div[@id='mySubscriptions']/div[" + i + "]") == true))//(quality.IsElementPresent("//div[" + i + "]/div[3]/a/span") == true))
                {
                    if (quality.GetText("xpath=(//div[@id='button']/a/span)[" + i + "]") == "Unlock Code")
                    {
                        check = true;
                        quality.Click("xpath=(//div[@id='button']/a/span)[" + i + "]");
                        quality.WaitForPageToLoad("30000");
                    }

                    i++;
                }
            }

            //comment: Check the Activate Traffic Subscription Unlock Page
            ken.ActivateTrafficSubscriptionUnlockCodePage();

            //comment: Click on Send button without entering any email address : Traffic Subscription Unlock Code
            quality.Click("css=a.button.left > span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Traffic Subscription Unlock Code", quality.GetTitle());
            quality.AreEqual("Email address is required", quality.GetText("css=ul.error > li"));

            //comment: Click on Send button with an invalid email address : Traffic Subscription Unlock Code
            quality.Type("id=email", "1@1");
            quality.Click("css=a.button.left > span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Traffic Subscription Unlock Code", quality.GetTitle());
            quality.AreEqual("Please enter a valid Email Address", quality.GetText("css=ul.error > li"));

            //comment: Click on Send button with a valid email address : Traffic Subscription Unlock Code
            quality.Type("id=email", "*****@*****.**");
            quality.Click("css=a.button.left > span");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Traffic Subscription Unlock Code", quality.GetTitle());
            quality.AreEqual("We have sent the unlock code to your email address", quality.GetText("css=div.confirmationDialog-mid"));

            //comment: GO to Subscriptions page
            quality.Click("link=My Subscriptions");
            quality.WaitForPageToLoad("30000");

            // comment: Go back to My Account
            quality.Click("link=« Back");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Account Settings", quality.GetTitle());

            // 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);
            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=DNX5220");
            try
            {
                selenium.Click("link=DNX5220");
            }
            catch (Exception)
            {
            }

            quality.WaitForPageToLoad("30000");


            ken.ProductUpdatesPage(true);

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

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

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

            //comment: Validate the "Add to Cart: Traffic Subscription" - do not enter any value and press the Continue btn
            quality.Click("link=Continue");
            quality.WaitForPageToLoad("30000");

            //quality.IsTextPresent("Traffic Receiver ID is required");
            quality.IsTextPresent("Unit ID is required");

            //comment: special characters for Unit ID
            quality.Type("id=unitId", "!@#$%@@%$$#@!$%#@!!$%$");
            quality.Click("link=Continue");
            quality.WaitForPageToLoad("30000");
            //quality.AreEqual("Add to Cart: Traffic Verification", quality.GetTitle());
            //quality.IsTextPresent("Traffic Receiver ID is required");
            quality.IsTextPresent("Please enter a valid Unit ID");

            //comment: special caracters for unit Id and traffic receivcer ID
            quality.Type("id=unitId", "!@#$%@@%$$#@!$%#@!!$%$");
            //quality.Type("id=trafficReceiverId", "!@#$%@@%$$#@!$%#@!!$%$");
            quality.Click("link=Continue");
            quality.WaitForPageToLoad("30000");
            //quality.AreEqual("Add to Cart: Traffic Verification", quality.GetTitle());
            //quality.IsTextPresent("Please enter a valid Traffic Receiver ID");
            quality.IsTextPresent("Please enter a valid Unit ID");

            //comment: Type special characters for traffic receiver id
            quality.Type("id=unitId", "");
            //quality.Type("id=trafficReceiverId", "!@#$%@@%$$#@!$%#@!!$%$");
            quality.Click("link=Continue");
            quality.WaitForPageToLoad("30000");
            //quality.AreEqual("Add to Cart: Traffic Verification", quality.GetTitle());
            //quality.IsTextPresent("Please enter a valid Traffic Receiver ID");
            quality.IsTextPresent("Unit ID is required");

            //comment: Type string characters for Unit ID
            quality.Type("id=unitId", "qweqrrqwerewqrwerweqrqwrwqrwrwq");
            //quality.Type("id=trafficReceiverId", "qweqrrqwerewqrwerweqrqwrwqrwrwq");
            quality.Click("link=Continue");
            quality.WaitForPageToLoad("30000");
            //quality.AreEqual("Add to Cart: Traffic Verification", quality.GetTitle());
            //quality.IsTextPresent("Please enter a valid Traffic Receiver ID");
            quality.IsTextPresent("Please enter a valid Unit ID");

            //comment: Type invalid values for Unit ID and Traffic Receiver ID
            quality.Type("id=unitId", "-1");
            //quality.Type("id=trafficReceiverId", "-1");
            quality.Click("link=Continue");
            quality.WaitForPageToLoad("30000");
            // quality.AreEqual("Add to Cart: Traffic Verification", quality.GetTitle());
            quality.IsTextPresent("The Unit ID you entered is not valid");
            //quality.AreEqual("The Traffic Receiver ID you entered is not valid", quality.GetText("//div[@id='bd']/ul/li[2]"));

            //comment: Type a valid a Traffic Receiver ID and press "Continue" without a Unit ID
            quality.Type("id=unitId", "");
            //quality.Type("id=trafficReceiverId", unitIdNotRegistered);
            quality.Click("link=Continue");
            quality.WaitForPageToLoad("30000");
            // quality.AreEqual("Add to Cart: Traffic Verification", quality.GetTitle());
            quality.IsTextPresent("Unit ID is required");

            //comment: Type a valid Unit Id and a valid traffic receiver id which is registered to another user account
            quality.Type("id=unitId", "");
            //quality.Type("id=trafficReceiverId", "");
            quality.Type("id=unitId", unitIdRegistered);
            //quality.Type("id=trafficReceiverId", unitIdRegistered);
            quality.Click("link=Continue");
            quality.WaitForPageToLoad("30000");
            //quality.AreEqual("Add to Cart: Traffic Verification", quality.GetTitle());
            quality.IsTextPresent("This device is currently registered to another user account");
            //quality.AreEqual("This traffic receiver is currently registered to another user account", quality.GetText("//div[@id='bd']/ul/li[2]"));

            //comment: Type a valid Unit ID and leave empty the Traffic Receiver ID
            quality.Type("id=unitId", unitIdNotRegistered);
            //quality.Type("id=trafficReceiverId", "");
            quality.Click("link=Continue");
            quality.WaitForPageToLoad("30000");
            //quality.AreEqual("Add to Cart: Traffic Verification", quality.GetTitle());
            //quality.IsTextPresent("Traffic Receiver ID is required");



            //ken.AddToCartTrafficVerification(quality, false);
            //ken.ShoppingCartWithTrafficSubscriptionToBuy(true);

            ken.Logout();
        }
示例#9
0
        //this is the test code generated by selenium
        //****Paste test script here*****
        public override void RunTest()
        {
            selenium.Open(base.baseURL);
            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=DNX7220");
            quality.WaitForPageToLoad("30000");

            ken.ProductUpdatesPage(true);

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

            //comment: Check the "Real Traffic 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");

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

            // comment: Type a Valid Unit ID
            quality.Type("id=unitId", "");
            quality.Type("id=unitId", "3422110080");
            quality.Click("//form[@id='verifyTrafficForm']/table/tbody/tr[5]/td/a[2]/span");

            quality.WaitForPageToLoad("30000");

            ken.ShoppingCartWithTrafficSubscriptionToBuy(true);

            // comment: Click "Update" button even if the QTY is disabled to be changed
            try
            {
                if (selenium.IsEditable("id=quantityDisabled") == false)
                {
                    quality.ErrorReport("Quantity Cannot be changed", CheckType.Element);
                }
            }
            catch (Exception)
            {
            }



            quality.Click("css=a.button > span");
            quality.WaitForPageToLoad("30000");

            ken.ShoppingCartWithTrafficSubscriptionToBuy(true);
            ken.Logout();
        }
        //this is the test code generated by selenium
        //****Paste test script here*****
        public override void RunTest()
        {
            selenium.Open(base.baseURL);
            quality.AreEqual("Garmin Product Updates for Kenwood", quality.GetTitle());
            quality.Click("link=Sign In");
            quality.WaitForPageToLoad("30000");

            ken.SignInPage();

            //ken.Login(quality, "testuser201234", password, "test", false);
            ken.Login(username, password, fullname, false);

            // comment: Check the My Account menu
            quality.Click("link=My Account");
            quality.WaitForPageToLoad("30000");

            ken.MyAccountPage(false);

            // comment: Click on the "View Subscription" button
            quality.Click("//div[@id='bd']/div[6]/a/span");
            quality.WaitForPageToLoad("30000");

            ken.ViewSubscriptionsPage(false, false);

            //comment: Click on the first FOUND Active button
            bool check = false;

            quality.IsTextPresent("Activate");

            if (quality.GetText("css=#button > a.button > span") == "Activate")
            {
                quality.Click("css=#button > a.button > span");
                quality.WaitForPageToLoad("30000");
            }
            else if (quality.IsElementPresent("//div[4]/div/div[3]/div[3]/a/span") == true)
            {
                if (quality.GetText("//div[4]/div/div[3]/div[3]/a/span") == "Activate")
                {
                    quality.Click("//div[4]/div/div[3]/div[3]/a/span");
                    quality.WaitForPageToLoad("30000");
                }
            }
            else if (quality.IsElementPresent("//div[" + 4 + "]/div[3]/a/span"))
            {
                int i = 10;
                while (!check && (quality.IsElementPresent("//div[" + i + "]/div[3]/a/span") == true))
                {
                    if (quality.GetText("//div[" + i + "]/div[3]/a/span") == "Activate")
                    {
                        check = true;
                        quality.Click("//div[" + i + "]/div[3]/a/span");
                        quality.WaitForPageToLoad("30000");
                    }

                    i++;
                }
            }

            //comment: Check activate traffic subscription page


            //comment: Click Activate button from the "Activate traffic Subscription" page without entering a unit id
            Thread.Sleep(5000);
            quality.IsTextPresent("Activate");
            selenium.Click("xpath=(//div[@id='button']/a/span)[15]");
            quality.WaitForPageToLoad("30000");
            //quality.AreEqual("Activate Traffic Subscription", quality.GetTitle());
            //quality.IsTextPresent("Traffic Receiver ID is required");

            //comment: Type an invalid Traffic Receiver Id
            quality.Type("id=trafficReceiverId", "as!>?#$%@#!@# 21sasdas9813265dasadaas!@#!@# 21sasdsdad786");
            quality.Click("css=a.button > span");
            quality.WaitForPageToLoad("30000");
            //quality.AreEqual("Activate Traffic Subscription", quality.GetTitle());
            quality.IsTextPresent("Please enter a valid Traffic Receiver ID");

            //comment: Type an negative Traffic Receiver Id
            quality.Type("id=trafficReceiverId", "-1");
            quality.Click("css=a.button > span");
            quality.WaitForPageToLoad("30000");

            quality.AreEqual("The Traffic Receiver ID you entered is not valid", quality.GetText("css=ul.error > li"));

            //comment: Type only characters Traffic Receiver Id
            quality.Type("id=trafficReceiverId", "qwedqewrqwerqwe");
            quality.Click("css=a.button > span");
            quality.WaitForPageToLoad("30000");

            quality.AreEqual("The Traffic Receiver ID you entered is not valid", quality.GetText("css=ul.error > li"));

            //comment: Type only special characters Traffic Receiver Id
            quality.Type("id=trafficReceiverId", "!$#@$#$!@#!$@#");
            quality.Click("css=a.button > span");
            quality.WaitForPageToLoad("30000");

            quality.AreEqual("The Traffic Receiver ID you entered is not valid", quality.GetText("css=ul.error > li"));

            ////comment: Type a VALID Traffic Receiver Id
            //quality.Type("id=trafficReceiverId", unitId);
            //quality.Click("css=a.button > span");
            //quality.WaitForPageToLoad("30000");
            //quality.AreEqual("Activate Traffic Subscription", quality.GetTitle());
            //quality.AreEqual("The Traffic Receiver ID you entered is not valid", quality.GetText("css=ul.error > li"));

            //comment: GO to Subscriptions page
            quality.Click("link=My Subscriptions");
            quality.WaitForPageToLoad("30000");

            // comment: Go back to My Account
            quality.Click("link=« Back");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Account Settings", quality.GetTitle());

            // comment: Sign Out
            ken.Logout();
        }
示例#11
0
        //this is the test code generated by selenium
        //****Paste test script here*****
        public override void RunTest()
        {
            selenium.Open(base.baseURL);

            ken.WelcomePage();

            quality.Click("link=Sign In");
            quality.WaitForPageToLoad("30000");

            //comment: Go to Sing In page
            ken.SignInPage();

            ken.SignIn("asdfgh", "qasdasdfsfgsd");
            // comment: Insert any username and password
            quality.AreEqual("Sign In", selenium.GetTitle());
            quality.AreEqual("The username/password combination is not valid", selenium.GetText("css=ul.error > li"));

            // comment: Enter only username
            ken.SignIn("qwerty", "");
            quality.AreEqual("Sign In", selenium.GetTitle());
            quality.AreEqual("Password is required to login", selenium.GetText("css=ul.error > li"));

            // comment: Sign in without entering any information

            ken.SignIn("", "");

            quality.AreEqual("Sign In", selenium.GetTitle());
            quality.AreEqual("Username is required to login", selenium.GetText("css=ul.error > li"));
            quality.AreEqual("Password is required to login", selenium.GetText("//div[@id='bd']/ul/li[2]"));

            // comment: Enter only password
            ken.SignIn("", "asfdsffgdfgs");

            quality.AreEqual("Sign In", selenium.GetTitle());
            quality.AreEqual("Username is required to login", selenium.GetText("css=ul.error > li"));

            // comment: Enter more than 25 characters in both fields

            ken.SignIn("as!@#!@# 21sasdasdasadasdadaaasdadassasdasdasadasdadaaasdad\\\\", "as!@#!@# 21sasdasdasadasdadaaasdadassasdasdasadasdadaaasdad\\\\");

            quality.AreEqual("Sign In", selenium.GetTitle());
            quality.AreEqual("Username is invalid", selenium.GetText("css=ul.error > li"));
            quality.AreEqual("Password is invalid", selenium.GetText("//div[@id='bd']/ul/li[2]"));

            // comment: Insert less than 25 characters in both fields

            ken.SignIn("as!@#!@# 21sasdasdasad", "as!@#!@# 21sasdasdasad");

            quality.AreEqual("Sign In", selenium.GetTitle());
            quality.AreEqual("The username/password combination is not valid", selenium.GetText("css=ul.error > li"));

            // comment: Click on Forgot Username link
            quality.Click("link=Forgot username");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Forgot Username", selenium.GetTitle());
            quality.AreEqual("Forgot Username", selenium.GetText("css=div.titleHeader-text"));
            quality.AreEqual("To retrieve your username, enter the email address that you saved in your myGarmin account. If you did not save an email address in your account or you do not remember it, please contact Product Support.", selenium.GetText("css=p.prompt"));
            quality.AreEqual("Product Support", quality.GetText("link=Product Support"));
            quality.AreEqual("Email Address", selenium.GetText("css=div.inputIndicator-text"));
            quality.AreEqual("", selenium.GetText("id=email"));
            quality.AreEqual("Submit", selenium.GetText("css=a.button > span"));

            // comment: Go Back to Sign in page
            quality.Click("link=Sign In");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Sign In", selenium.GetTitle());

            // comment: Click on Forgot Password
            selenium.Click("link=Forgot password");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Forgot Password", selenium.GetTitle());
            quality.AreEqual("Forgot Password", selenium.GetText("css=div.titleHeader-text"));
            quality.AreEqual("To reset your password, enter the username of your myGarmin account. If you do not remember your username, please contact Product Support.", selenium.GetText("css=p.prompt"));
            quality.AreEqual("Product Support", quality.GetText("link=Product Support"));
            quality.AreEqual("Username", selenium.GetText("css=div.inputIndicator-text"));
            //quality.AreEqual("", selenium.GetValue("css=div.inputIndicator-text"));
            quality.AreEqual("Submit", selenium.GetText("css=a.button > span"));

            // comment: Go Back to Sign in page
            quality.Click("link=Sign In");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Sign In", selenium.GetTitle());

            // comment: Click on Create Account button
            quality.Click("css=div.left > a.button > span");
            quality.WaitForPageToLoad("30000");

            ken.CreateAccountPage();

            // comment: Go Back to Sign in page
            quality.Click("link=Sign In");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Sign In", selenium.GetTitle());

            // comment: Enter more than 25 characters in User Name and nothing for password
            ken.SignIn("as!@#!@# 21sasdasdasadasdadaaasdadassasdasdasadasdadaaasdad\\\\", "");

            quality.AreEqual("Sign In", selenium.GetTitle());
            quality.AreEqual("Username is invalid", selenium.GetText("css=ul.error > li"));
            quality.AreEqual("Password is required to login", selenium.GetText("//div[@id='bd']/ul/li[2]"));

            // comment: Enter more than 25 characters in password field and nothing for User Name

            ken.SignIn("", "as!@#!@# 21sasdasdasadasdadaaasdadassasdasdasadasdadaaasdad\\\\");

            quality.AreEqual("Sign In", selenium.GetTitle());
            quality.AreEqual("Username is required to login", selenium.GetText("css=ul.error > li"));
            quality.AreEqual("Password is invalid", selenium.GetText("//div[@id='bd']/ul/li[2]"));

            // comment: Enter valid credentials
            ken.Login(username, password, fullname, false);

            // comment: SignOut
            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();
        }
        //this is the test code generated by selenium
        //****Paste test script here*****
        public override void RunTest()
        {
            selenium.Open(base.baseURL);
            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 "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");

            ken.SignInPage();

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

            //comment: Check the "Add to Cart: Traffic Pop Up for the already registered device" page
            ken.AddToCartTraffic_PopUp_AlreadyRegistered();

            //comment: CLick on the "Continue" button from the popup
            quality.Click("//button[@type='button']");
            quality.WaitForPageToLoad("30000");
            quality.AreEqual("Product Updates for Kenwood DNX7180", quality.GetTitle());

            ken.ProductUpdatesPage(true);

            ken.Logout();
        }
        //this is the test code generated by selenium
        //****Paste test script here*****
        public override void RunTest()
        {
            selenium.Open(base.baseURL);
            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 "Latest Map" button
            quality.Click("css=div.description > span");
            quality.WaitForPageToLoad("30000");

            //comment: Check the "Latest Map for Kenwood"
            ken.LatestMapForKenwoodPage(true);

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

            ken.ShoppingCartWithLatestMapToBuy();

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

            ken.SignInPage();

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

            ken.CheckOutPage();
        }