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