public void createEmailAdmin() { XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); //username = oXMLData.getData("settings/credentials", "Artzyusername"); String adminemail = loginHelper.GetFromFile("Admin"); //Verify title verifyTitle("Login"); //Go to the yopmail GetWebDriver().Navigate().GoToUrl("http://www.yopmail.com/en/"); //verify title verifyTitle("YOPmail"); //enter email loginHelper.type("YopmailLogin", adminemail); //click on check inbox loginHelper.ClickElement("CheckInbox"); //Verify title verifyTitle("Inbox"); //Click on email loginHelper.clickInFrame("ifinbox", "YopEmail"); Console.WriteLine("CreateEmailAdmin"); //Capture screenshot fot the screen loginHelper.TakeScreenshot("CreateEmailAdmin - Artzy"); }
public void adminRegistration() { Console.WriteLine("_21AdminRegistration"); string username = ""; string[] password = null; string[] loginURL = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSetting.xml"); ArtzyLoginHelper loginHelper = new ArtzyLoginHelper(GetWebDriver()); adminHelper = new AdminHelper(GetWebDriver()); //username = oXMLData.getData("settings/credentials", "Artzyusername"); username = loginHelper.GetFromFile("Registration"); string adminemail = loginHelper.GetFromFile("Admin"); password = oXMLData.getData("settings/credentials", "Artzypassword"); loginURL = oXMLData.getData("settings/URL", "ArtzyApplication"); //Verify Page title verifyTitle("Artzy Login"); //Go to the yopmail GetWebDriver().Navigate().GoToUrl("http://www.yopmail.com/en/"); //verify title verifyTitle("YOPmail"); //enter email loginHelper.type("YopmailLogin", adminemail); //click on check inbox loginHelper.ClickElement("CheckInbox"); //Verify title verifyTitle("Inbox"); //Click on email loginHelper.clickInFrame("ifinbox", "YopEmail"); //Click on link loginHelper.clickInFrame("ifmail", "HereURL"); //Switch to new window loginHelper.SelectWindow("Reset password"); //Verify title verifyTitle("Reset password"); //Enter email loginHelper.type("Email", adminemail); //Enter passoword loginHelper.type("ResetPassword", password[0]); //Enter confirm loginHelper.type("ConfirmPasswrd", password[0]); //Click on Reset password button loginHelper.ClickElement("ResetButton"); //Verify title verifyTitle("Artzy - Reset password confirmation"); //Go to the login page GetWebDriver().Navigate().GoToUrl(loginURL[0]); //Verify title verifyTitle("Artzy Login"); //Login with email address Login(adminemail, password[0]); //Click on sigin button loginHelper.ClickElement("Signin"); //Capture screenshot fot the screen loginHelper.TakeScreenshot("AdminRegistration - Artzy"); }
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"); }
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"); }
public void forgotPassword() { Console.WriteLine("_22ForgotPassword"); 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"); //Click on forgot password link loginHelper.ClickElement("ForgotPassword"); //Verify Page title verifyTitle("Artzy- Forgot Password"); //Enter email loginHelper.type("Email", username); //Click on email link button loginHelper.ClickElement("LinkButton"); //Verify title verifyTitle("Artzy- Forgot Password Confirmation"); //Go to the yopmail GetWebDriver().Navigate().GoToUrl("http://www.yopmail.com/en/"); //verify title verifyTitle("YOPmail"); //enter email loginHelper.type("YopmailLogin",username); //click on check inbox loginHelper.ClickElement("CheckInbox"); //Verify title verifyTitle("Inbox"); //Click on email loginHelper.clickInFrame("ifinbox", "YopEmail"); //Click on link loginHelper.clickInFrame("ifmail", "HereURL"); //Switch to new window loginHelper.SelectWindow("Reset password"); //Verify title verifyTitle("Reset password"); //Enter email loginHelper.type("Email",username); //Enter New Password loginHelper.type("ResetPassword", "1qaz1QAZ"); //Enter Confirm password loginHelper.type("ConfirmPasswrd", "1qaz1QAZ"); //Click on button loginHelper.ClickElement("ResetButton"); //Verify title verifyTitle("Artzy - Reset password confirmation"); //Click on Login link loginHelper.ClickElement("LoginLink"); //verify tite verifyTitle("Artzy Login"); //Login with email address Login(username, password[0]); //Capture screenshot fot the screen loginHelper.TakeScreenshot("ForgotPassword - Artzy"); }