public void changePassword() { Console.WriteLine("_04ChangePassword"); 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"); //Wait for text loginHelper.WaitForTextInPage("Confirm New Password", 30); //Verify title verifyTitle("Change Password"); //Enter Current password loginHelper.type("CurrentPassword",password[0]); //Enter New password loginHelper.type("NewPassword", "NewPassword"); //Enter Confirm password loginHelper.type("ConfirmPasswor", "NewPassword"); //Click on Change password button loginHelper.ClickElement("ChangeSave"); //Wait for text loginHelper.WaitForTextInPage("Password has been changed successfully.", 30); //Logout from the application Logout(); //wait for text loginHelper.WaitForTextInPage("Use your email to sign in.", 30); //Verify Page title verifyTitle("Artzy Login"); String Password1 = "NewPassword"; //Login with New Password Login(username, Password1); //Click on sigin button loginHelper.ClickElement("Signin"); //Change Password to deault //wait for text //loginHelper.WaitForTextInPage(username, 30); //Verify Page title loginHelper.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); //Enter Current password loginHelper.type("CurrentPassword", Password1); //Enter New password loginHelper.type("NewPassword", password[0]); //Enter Confirm password loginHelper.type("ConfirmPasswor", password[0]); //Click on Change password button loginHelper.ClickElement("ChangeSave"); //Wait for text loginHelper.WaitForTextInPage("Password has been changed successfully.", 30); //Logout from the application Logout(); //Capture screenshot fot the screen loginHelper.TakeScreenshot("ChangePassword - Artzy"); }