//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() { //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("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(); }
//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"); quality.AreEqual("Sign In", quality.GetTitle()); ken.Login("newtestuser5", "password", "my name", false); // comment: Check the My Account menu quality.Click("link=My Account"); quality.WaitForPageToLoad("30000"); ken.MyAccountPage(true); // comment: Click on the "Edit Account" button quality.Click("css=a.button > span"); quality.WaitForPageToLoad("30000"); quality.AreEqual("Edit Account", quality.GetTitle()); ken.EditAccountPage(); // comment: Go back to My Account quality.Click("link=My Account"); quality.WaitForPageToLoad("30000"); quality.AreEqual("Account Settings", quality.GetTitle()); // comment: Click on the "Change Password" button quality.Click("//div[@id='bd']/div[4]/a[2]/span"); quality.WaitForPageToLoad("30000"); ken.ChangePasswordPage(); // comment: Go back to My Account quality.Click("link=My Account"); quality.WaitForPageToLoad("30000"); quality.AreEqual("Account Settings", quality.GetTitle()); // comment: Click on the "View Subscription" button quality.Click("//div[@id='bd']/div[6]/a/span"); quality.WaitForPageToLoad("30000"); ken.ViewSubscriptionsPage(true, false); // comment: Press "Back" button to switch to My Account quality.Click("css=a.button > span"); quality.WaitForPageToLoad("30000"); quality.AreEqual("Account Settings", quality.GetTitle()); // comment: Click on the "View All Orders" button quality.Click("//div[@id='bd']/div[6]/a[2]/span"); quality.WaitForPageToLoad("30000"); ken.OrderSummary(true); // comment: Press "Back" button to switch to My Account quality.Click("css=a.button > span"); quality.WaitForPageToLoad("30000"); quality.AreEqual("Account Settings", quality.GetTitle()); // comment: Click on the "View Downloads" button quality.Click("//div[@id='bd']/div[6]/a[3]/span"); quality.WaitForPageToLoad("30000"); ken.ViewDownloadsPage(true); // comment: Press "Back" button to switch to My Account quality.Click("css=a.button > span"); quality.WaitForPageToLoad("30000"); quality.AreEqual("Account Settings", quality.GetTitle()); // comment: Sign Out ken.Logout(); }