[TestCase("pinkfloyd", "password")] //enters valid username and password public void TestNavigationControlExplorePage(string user, string password) { //calls helper method InitLoginPage InitLoginPage(user, password, null, null, null); Thread.Sleep(2000); //creates instance of NavigationControl object Navigationcontrol navControl = new Navigationcontrol(driver); //verifies navigation links VerifyNavigationControl(navControl); //signs out from homepage navControl.SignOut(); }
public void TestSignIn(string user, string password, string errorMessage = null, string userErrorMessage = null, string passwordErrorMessage = null) { this.InitLoginPage(user, password, errorMessage, userErrorMessage, passwordErrorMessage); if (errorMessage == null && userErrorMessage == null && passwordErrorMessage == null) { Thread.Sleep(2000); //creates new homepage object HomePage homepage = new HomePage(driver); //verifies homepage title homepage.VerifyTitleAndFooter(); Thread.Sleep(2000); //creates instance of NavigationControl object Navigationcontrol navControl = new Navigationcontrol(driver); //signs out from homepage navControl.SignOut(); Thread.Sleep(2000); } }
[TestCase("user", "password", "[]\\;'/", "[]\\;'/")] //enters valid username and password public void TestChangePasswordFields(string user, string password, string newPassword, string confirmNewPassword) { //calls helper method InitLoginPage InitLoginPage(user, password, null, null, null); Thread.Sleep(2000); //creates instance of NavigationControl object Navigationcontrol navControl = new Navigationcontrol(driver); //verifies navigation links VerifyNavigationControl(navControl); //clicks on profile link navControl.GotoProfile(); Thread.Sleep(2000); //creates new Profile page object ProfilePageChangePassword changePassword = new ProfilePageChangePassword(driver); changePassword.VerifyChangePassword(password, newPassword, confirmNewPassword); Thread.Sleep(2000); //clicks on sign-out link navControl.SignOut(); Thread.Sleep(2000); //sign in again with a new password InitLoginPage(user, newPassword, null, null, null); Thread.Sleep(2000); //creates new homepage object HomePage homepage = new HomePage(driver); //verifies homepage title homepage.VerifyTitleAndFooter(); //clicks on profile link navControl.GotoProfile(); Thread.Sleep(2000); //creates new Profile page object changePassword = new ProfilePageChangePassword(driver); //resets to original password changePassword.VerifyChangePassword(newPassword, password, password); }
[TestCase("user", "password")] //enters valid username and password public void TestComposeNewYip(string user, string password) { //calls helper method InitLoginPage InitLoginPage(user, password, null, null, null); Thread.Sleep(2000); //creates instance of composenewyip object ComposeNewYip newyip = new ComposeNewYip(driver); //sends 'Desired text' into textarea based the 'Count' mentioned and clicks on yip button newyip.ComposeYip("Wow!", 20, true); Thread.Sleep(2000); //calls verify method-- it checks the yiptext and the remaining count of charlabel newyip.Verify("", 140); Thread.Sleep(2000); //creates instance of NavigationControl object Navigationcontrol navControl = new Navigationcontrol(driver); //verifies navigation links VerifyNavigationControl(navControl); //signs out from homepage navControl.SignOut(); }