public void changePasswordValidation() { Console.WriteLine("_05ChangePasswordValidation"); string username = ""; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); password = oXMLData.getData("settings/credentials", "Artzypassword"); //Verify Page title verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Verify Page title verifyTitle("Index"); //Click on user-id loginHelper.ClickElement("ClickId"); //Click on Change Password loginHelper.ClickElement("ChangePassword"); //Verify title verifyTitle("Change Password"); //Wait for text loginHelper.WaitForTextInPage("Confirm New Password", 30); //Click on Change password without any field. loginHelper.ClickElement("ChangeSave"); //Verify Validation message loginHelper.VerifyPageText("Please enter current password"); loginHelper.VerifyPageText("Please enter new password"); //Enter Wrong current password loginHelper.type("CurrentPassword", "WrongPassword"); //Enter New password loginHelper.type("NewPassword", "NewPassword"); //Enter Confirm password loginHelper.type("ConfirmPasswor", "NewPassword"); //Click on Change password after entering wrong password loginHelper.ClickElement("ChangeSave"); //Wait for text loginHelper.WaitForTextInPage("Incorrect password.", 30); //Verify validation message loginHelper.VerifyPageText("Incorrect password."); //Logout from the application Logout(); //Capture screenshot fot the screen loginHelper.TakeScreenshot("ChangePassword - Artzy"); }