/* * Method validates the create account fields */ public void Validates_Fields_CreateAccount() { try { Create_Account_Button.Click(); Utils.VisibleElement("Validates the Email Field is visible", Email); Utils.VisibleElement("Validates the Password Field is visible", Password); Utils.Enable("Validates the Next Button is Disable", Next_Button); Email.Click(); Email.SendKeys(VALUE_INCORRECT_EMAIL); //Enter text incorrect Password.Click(); Utils.VisibleElement("Validates the Error message is visible", ErrorMessage); //Validate the Error message is visible Utils.Asserts("Validates the password field is not Focusable", "false", Utils.Focus_Element("et_account_password")); Utils.Enable("Validates the Next Button is Disable", Next_Button); Password.Click(); Utils.Asserts("Validates the password field is Focusable", "true", Utils.Focus_Element("et_account_password")); Password.SendKeys(VALUE_PASS); Utils.HideKeyboard(); Utils.Enable("Validates the Next Button is Disable", Next_Button); HidePassword.Click(); Utils.Asserts("Validate the Password Hide correct", VALUE_HIDE_PASS, Utils.Get_Attribute(Password, "text")); } catch (Exception error) { Console.WriteLine("This Method Validates_Fields_CreateAccount could not be execute", error); } }
/* * Method, Validate the create Succesfull a new Account */ public void Create_Successfull_Account() { Create_Account_Button.Click(); //Press Create a new Account button Utils.VisibleElement("Validates the Email Field is visible", Email); Utils.VisibleElement("Validates the Password Field is visible", Password); Email.SendKeys(VALUE_EMAIL3); //Enter text, Valid Email Utils.Enable("Validates the Next Button is Disable", Next_Button); //Validates, the Next Button is disable Password.SendKeys(VALUE_PASS); //Enter text Password Utils.Enable("Validates the Next Button is Enable", Next_Button); //Validates, the Next Button is Enable Next_Button.Click(); WebDriverWait wait2 = new WebDriverWait(_driver, TimeSpan.FromSeconds(30)); //Wait Until the Text "Whats your name" is visible wait2.Until(ExpectedConditions.ElementIsVisible(By.Id("text_sign_up_name_title"))); Utils.Asserts("Validates, the frame'Whats your name' is visible", EXPECT_FRAME_NAME, Utils.Get_Attribute(Name_Title_Field, "text")); //Validate the title is visible// Name_Field.SendKeys(VALUE_NAME); //Enter text Fisrt and last Name Next_Button.Click(); //Press Nex button wait2.Until(ExpectedConditions.ElementIsVisible(By.Id("etZipCode"))); Utils.SendKeys_Keyboard("5434"); Button_Loading.Click(); //Press button loading wait2.Until(ExpectedConditions.ElementIsVisible(By.XPath("//*[@text='PERMITIR' or @text='ALLOW']"))); Permission_Allow.Click(); wait2.Until(ExpectedConditions.ElementIsVisible(By.Id("text_sign_up_work_experience_category_position_title"))); //Wait Until the Text "Please Select the category Job" is visible Utils.Asserts("Validates, the Category job title is correct", EXPECT_CATEGORY_TEXT, Utils.Get_Attribute(Select_Job_Title, "text")); Text_Skip.Click(); //Press "No work experience button" wait2.Until(ExpectedConditions.ElementIsVisible(By.Id("text_sign_up_complete_profile_title"))); Utils.Asserts("Validates, the Profile Picture title is correct", EXPECT_PROFILE_PICTURE, Utils.Get_Attribute(Profile_Picture_Title, "text")); Text_Skip.Click(); wait2.Until(ExpectedConditions.ElementIsVisible(By.Id("text_sign_up_candidate_congratulation_title"))); //Wait Until the Text "Please complete your profile" is visible Utils.Asserts("Validates, the Congrulation Picture title is correct", EXPECT_COMPLETE_PROFILE, Utils.Get_Attribute(Congrulation_Title, "text")); Utils.Asserts("Validates, the Candidate Name is correct", EXPECT_CANDIDATE_NAME, Utils.Get_Attribute(Candidate_Name, "text")); Edit_Profile.Click(); //Press Edit Profile Button wait2.Until(ExpectedConditions.ElementIsVisible(By.XPath("//*[@text='Personal Profile']"))); //Wait Until the Page "Personal profile" is visible Number_Field.Click(); Number_Field.SendKeys(VALUE_NUMBER); Next_Button.Click(); Utils.Asserts("Validates, the Search text", EXPECT_SEARCH_TEXT, Utils.Get_Attribute(Personal_Profile_Title, "text")); }