public void TestRegPagewithInvalidValues() { string firstName = "J"; string lastName = "K"; string department = "Engineering"; string userName = "******"; string password = "******"; string eMail = "johncom"; string contact = "98675647a"; IWebElement FName, LName, UName, Pwd, confirmPwd, Email, Phone, Submit; SelectElement Department; regPage.elements(Browser, out FName, out LName, out UName, out Pwd, out confirmPwd, out Email, out Phone, out Department, out Submit); FName.SendKeys(firstName); //var isValidIcon = FName.FindElement(By.ClassName("glyphicon-ok")); Assert.IsTrue((isInvalidDataIcon(FName)), "Invalid data icon is not displayed on entering the incorrect data on First Name" + FName.Text); LName.SendKeys(lastName); Assert.IsTrue((isInvalidDataIcon(LName)), "Invalid data icon is not displayed on entering the incorrect data on Last Name" + LName.Text); Department.SelectByText(department); UName.SendKeys(userName); Assert.IsTrue((isInvalidDataIcon(UName)), "Invalid data icon is not displayed on entering the incorrect data on Last Name" + UName.Text); Pwd.SendKeys(password); Assert.IsTrue((isInvalidDataIcon(Pwd)), "Invalid data icon is not displayed on entering the incorrect data on Last Name" + Pwd.Text); confirmPwd.SendKeys(password); Assert.IsTrue((isInvalidDataIcon(confirmPwd)), "Invalid data icon is not displayed on entering the incorrect data on Last Name" + confirmPwd.Text); Phone.SendKeys(contact); Assert.IsTrue((isInvalidDataIcon(Phone)), "Invalid data icon is not displayed on entering the incorrect data on Last Name" + Phone.Text); Email.SendKeys(eMail); Assert.IsTrue((isInvalidDataIcon(Email)), "Invalid data icon is not displayed on entering the incorrect data on Last Name" + Email.Text); Assert.IsFalse((Submit.Enabled), "The form has incorrect data but Submit is enabled"); }
public void TestRegPageWithValidValues() { string firstName = "John"; string lastName = "Kerry"; string department = "Engineering"; string userName = "******"; string password = "******"; string eMail = "*****@*****.**"; string contact = "9867564789"; IWebElement FName, LName, UName, Pwd, confirmPwd, Email, Phone, Submit; SelectElement Department; regPage.elements(Browser, out FName, out LName, out UName, out Pwd, out confirmPwd, out Email, out Phone, out Department, out Submit); FName.SendKeys(firstName); //var isValidIcon = FName.FindElement(By.ClassName("glyphicon-ok")); Assert.IsTrue((isValidDataIcon(FName)), "valid data icon is not displayed on entering the correct data on First Name" + FName.Text); LName.SendKeys(lastName); Assert.IsTrue((isValidDataIcon(LName)), "valid data icon is not displayed on entering the correct data on Last Name" + LName.Text); Department.SelectByText(department); UName.SendKeys(userName); Assert.IsTrue((isValidDataIcon(UName)), "valid data icon is not displayed on entering the correct data on Last Name" + UName.Text); Pwd.SendKeys(password); Assert.IsTrue((isValidDataIcon(Pwd)), "valid data icon is not displayed on entering the correct data on Last Name" + Pwd.Text); confirmPwd.SendKeys(password); Assert.IsTrue((isValidDataIcon(confirmPwd)), "valid data icon is not displayed on entering the correct data on Last Name" + confirmPwd.Text); Phone.SendKeys(contact); Assert.IsTrue((isValidDataIcon(Phone)), "valid data icon is not displayed on entering the correct data on Last Name" + Phone.Text); Email.SendKeys(eMail); Assert.IsTrue((isValidDataIcon(Email)), "valid data icon is not displayed on entering the correct data on Last Name" + Email.Text); Submit.Click(); var success = Browser.FindElement(By.Id("contact_form")); Assert.True((success.Text == "Thanks"), "Registration was unsuccessful"); }
public void TestRegPagewithBlankFieldsonCompulsaryDataFields() { string firstName = ""; string lastName = ""; string department = "Engineering"; string userName = ""; string password = ""; string eMail = ""; string contact = "9867564790"; IWebElement FName, LName, UName, Pwd, confirmPwd, Email, Phone, Submit; SelectElement Department; regPage.elements(Browser, out FName, out LName, out UName, out Pwd, out confirmPwd, out Email, out Phone, out Department, out Submit); FName.SendKeys(firstName); LName.SendKeys(lastName); Department.SelectByText(department); UName.SendKeys(userName); Pwd.SendKeys(password); confirmPwd.SendKeys(password); Phone.SendKeys(contact); Email.SendKeys(eMail); if (Submit.Displayed && Submit.Enabled) { Submit.Click(); } Assert.IsTrue((isInvalidDataIcon(FName)), "Invalid data icon is not displayed on entering the incorrect data on First Name" + FName.Text); Assert.IsTrue((isInvalidDataIcon(LName)), "Invalid data icon is not displayed on entering the incorrect data on Last Name" + LName.Text); Assert.IsTrue((isInvalidDataIcon(UName)), "Invalid data icon is not displayed on entering the incorrect data on Last Name" + UName.Text); Assert.IsTrue((isInvalidDataIcon(Pwd)), "Invalid data icon is not displayed on entering the incorrect data on Last Name" + Pwd.Text); Assert.IsTrue((isInvalidDataIcon(confirmPwd)), "Invalid data icon is not displayed on entering the incorrect data on Last Name" + confirmPwd.Text); Assert.IsTrue((isInvalidDataIcon(Email)), "Invalid data icon is not displayed on entering the incorrect data on Last Name" + Email.Text); Assert.IsFalse((Submit.Enabled), "The form has blank data in required fields but Submit is enabled"); }
public string Helper_CreateFullName() { StringBuilder sb = new StringBuilder(); sb.Append(FName.ToTitleCase()); if (!MName.IsNullOrEmpty()) { sb.Append(" "); sb.Append(MName.ToTitleCase()); } if (!LName.IsNullOrEmpty()) { sb.Append(" "); sb.Append(LName.ToTitleCase()); } if (SonOfOrWifeOf != SonOfWifeOfDotOfENUM.Unknown) { sb.Append(" "); sb.Append(SonOfOrWifeOf.ToString()); sb.Append(" "); sb.Append(NameOfFatherOrHusband.ToTitleCase()); } //Add the Identity Card Number to make sure there are no unneccessary duplicates in the names //The Id card will be the item tjhat will bring about the uniqueness if (!IdentificationNo.IsNullOrEmpty()) { sb.Append(" "); sb.Append(string.Format("- National ID: {0}", IdentificationNo.ToPakistanCnicFormat())); } return(sb.ToString()); }
private void NormalUserPanel_Load(object sender, EventArgs e) { lDisplayFirstName.Text = FName.ToUpper(); lDisplayLastName.Text = LName.ToUpper(); lDisplayEmail.Text = UEmail.ToUpper(); lDisplayUserID.Text = UId.ToString(); lDate.Text = "Current Date: " + DateTime.Now.ToShortDateString() + " (" + DateTime.Now.DayOfWeek.ToString() + ")"; }
private void Button_Click(object sender, RoutedEventArgs e) { FName.Clear(); LName.Clear(); UserName.Clear(); Address.Clear(); City.Clear(); txtPassword.Clear(); MobileNo.Clear(); }
public string UpdateMemberParty() { con.sqlCommand("UpdateMemberParty"); con.InsertValint("@member_code", MemberCode); con.InsertValstring("@party_name", PartyName.Trim()); con.InsertValstring("@f_name", FName.Trim()); con.InsertValstring("@l_name", LName.Trim()); con.InsertValstring("@birth_date", GetDob().ToString()); con.InsertValint("@list_place", ListPlace); con.InsertValstring("@education", Education.Trim()); con.InsertValstring("@experience", Experience.Trim()); return(con.getVal("@Result").ToString()); }
public void RegisterNewAccount(String TestName) { var userData = ExcelSheet_UserData.GetTestData(TestName); /*Login Submit*/ FName.SendKeys(userData.FirstName); LName.SendKeys(userData.LastName); Email.SendKeys(userData.PhoneNO); Phone.SendKeys(userData.EmailAdd); Password.SendKeys(userData.PasswordUser); ConfirmPassword.SendKeys(userData.ConfirmPasswordUser); RegSubmit.Click(); }
public override int GetHashCode() { unchecked { var hashCode = (payments != null ? payments.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FName != null ? FName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (MName != null ? MName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (LName != null ? LName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (EGN != null ? EGN.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Address != null ? Address.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (MPhone != null ? MPhone.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Email != null ? Email.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (int)Type; return(hashCode); } }
void getLoginID() { string LoginSql = "select STAFF_LOGIN_ID from STAFF_LOGIN ORDER BY STAFF_LOGIN_ID"; string LName; int LID; string format = "0000000"; SqlDataAdapter ad = new SqlDataAdapter(LoginSql, consql); DataSet ds = new DataSet(); ad.Fill(ds, "STAFF_DETAIL"); if (ds.Tables["STAFF_DETAIL"].Rows.Count > 0) { LName = ds.Tables["STAFF_DETAIL"].Rows[ds.Tables["STAFF_DETAIL"].Rows.Count - 1][0].ToString(); LID = int.Parse(LName.Substring(1, (LName.Length - 1))); loginID = "L" + ((LID + 1).ToString(format)); } else { loginID = "L0000001"; } }
public override int GetHashCode() { if (FName == null) { if (LName == null) { return(0); } else { return(LName.GetHashCode()); } } else if (LName == null) { return(FName.GetHashCode()); } else { return(FName.GetHashCode() ^ LName.GetHashCode()); } }
private void DepartmentsList_SelectedIndexChanged(object sender, EventArgs e) { string name = DepartmentsList.SelectedItem.ToString(); var id = departments .Where(d => d.Name == name) .FirstOrDefault().Id; var emps = employees .Where(x => x.DepId == id) .ToList(); EmpList.Items.Clear(); foreach (var x in emps) { EmpList.Items.Add($"{x.FirstName} {x.LastName}"); } Add_but.Enabled = true; FName.Clear(); LName.Clear(); Position.Clear(); Experience.Clear(); }
public void FillFormForOthers(string examinationPosition, string appleant, string fName, string mName, string lName, string aka, string lastFourSSN, string contactPhone, string mailingAddress, string city, string state, string zip, string email, string cEmail, string empNumber, string payroll, string department, string appealIssue, string remedy ) { // SubmitAppeal.Clicks(); BtnIAgree.Clicks(); OtherHeadingID.Clicks(); Others.Clicks(); if (appleant == "Yourself") { FillingYourSelf.Click(); } FName.EnterText(fName); MName.EnterText(mName); LName.EnterText(lName); Aka.EnterText(aka); LastFourSSN.EnterText(lastFourSSN); ContactPhone.EnterText(contactPhone); MailingAddress.EnterText(mailingAddress); City.EnterText(city); State.ClearText(state); ZipCode.EnterText(zip); PreferredEmail.EnterText(email); ConfirmEmail.EnterText(cEmail); EmployeeNumber.EnterText(empNumber); Payroll.EnterText(payroll); EmployingDepartment.EnterText(department); AppealIssue.EnterText(appealIssue); Remedy.SendKeys(remedy); SubmitBtn.Clicks(); AcceptPopupBtn.Clicks(); }
public void FillFormForDisqualification(string disqulificationType, string examinationNumber, string examinationName, string appleant, string fName, string mName, string lName, string aka, string lastFourSSN, string contactPhone, string mailingAddress, string city, string state, string zip, string email, string cEmail, string empNumber, string payroll, string department, string appealIssue, string documentLocation, string attachmentDesciption, string authDoc, string authDocDesc, string remedy ) { //SubmitAppeal.Clicks(); BtnIAgree.Clicks(); DisqualificatioHeadingID.Clicks(); if (disqulificationType.Contains("Background")) { Background.Clicks(); ExaminationNumber.SendKeys(examinationNumber); ExaminationName.SendKeys(examinationName); if (appleant == "Yourself") { FillingYourSelf.Click(); } waitForPageUntilElementIsVisible(By.Id("x-auto-0-input"), 20); FName.EnterText(fName); MName.EnterText(mName); LName.EnterText(lName); Aka.EnterText(aka); LastFourSSN.EnterText(lastFourSSN); ContactPhone.EnterText(contactPhone); MailingAddress.EnterText(mailingAddress); City.EnterText(city); State.ClearText(state); ZipCode.EnterText(zip); PreferredEmail.EnterText(email); ConfirmEmail.EnterText(cEmail); EmployeeNumber.EnterText(empNumber); Payroll.EnterText(payroll); EmployingDepartment.EnterText(department); AppealIssue.EnterText(appealIssue); Attach.Clicks(); Browse.UploadFile(documentLocation); AttachmentDescription.EnterText(attachmentDesciption); Remedy.SendKeys(remedy); SubmitBtn.Clicks(); AcceptPopupBtn.Clicks(); } else if (disqulificationType.Contains("Inaccurate Disclosure")) { InaccurateDisclosure.Clicks(); ExaminationNumber.SendKeys(examinationNumber); ExaminationName.SendKeys(examinationName); if (appleant == "Yourself") { FillingYourSelf.Click(); } waitForPageUntilElementIsVisible(By.Id("x-auto-0-input"), 10); FName.EnterText(fName); waitForPageUntilElementIsVisible(By.Id("x-auto-1-input"), 10); MName.EnterText(mName); LName.EnterText(lName); Aka.EnterText(aka); LastFourSSN.EnterText(lastFourSSN); ContactPhone.EnterText(contactPhone); MailingAddress.EnterText(mailingAddress); City.EnterText(city); State.ClearText(state); ZipCode.EnterText(zip); PreferredEmail.EnterText(email); ConfirmEmail.EnterText(cEmail); EmployeeNumber.EnterText(empNumber); Payroll.EnterText(payroll); EmployingDepartment.EnterText(department); AppealIssue.EnterText(appealIssue); Attach.Clicks(); Browse.UploadFile(documentLocation); AttachmentDescription.EnterText(attachmentDesciption); AttachAdditional.Clicks(); BrowseAdditional.UploadFile(authDoc); DescriptionAdditional.EnterText(authDocDesc); Remedy.SendKeys(remedy); SubmitBtn.Clicks(); AcceptPopupBtn.Clicks(); } }
public EA_POM Edit_Enrolment() { Web_Driver.ngWebDriver.WaitForAngular(); //Getting Records Edit_Record_Previous = Edit_Record.Text; Console.WriteLine(Edit_Record_Previous + "Previous Record"); Edit_Id = Search_Record_Colums.Text; Console.WriteLine(Edit_Id + "Id"); Edit_En_btn.Click(); Web_Driver.ngWebDriver.WaitForAngular(); // Plan_Edit_Btn.Click(); //Getting Text of previous Fields Plan_Edit_strng = Plan_Edit_Text.Text; Console.WriteLine(Plan_Edit_strng); //Getting First Name Name_strng = Name.GetAttribute("value"); Console.WriteLine(Name_strng); Name.Clear(); Name.SendKeys("Ali"); //Getting New Values Name_strng1 = Name.GetAttribute("value"); Console.WriteLine(Name_strng1); //Getting Last Name LName_strng = LName.GetAttribute("value"); Console.WriteLine(LName_strng); LName.Clear(); LName.SendKeys("Asad"); //Getting new Values LName_strng1 = LName.GetAttribute("value"); Console.WriteLine(LName_strng1); //Getting MidName MName_strng = MName.GetAttribute("value"); Console.WriteLine(MName_strng); MName.Clear(); MName.SendKeys("Asa"); //Getting new Values MName_strng1 = MName.GetAttribute("value"); Console.WriteLine(MName_strng1); //Getting Date of Birth Dob_strng = Dob.GetAttribute("value"); Console.WriteLine(Dob_strng); Dob.Clear(); Dob.SendKeys("10/11/2022"); //Getting new Values Dob_strng1 = Dob.GetAttribute("value"); Console.WriteLine(Dob_strng1); //Radio btn male_radio = Radio_M_F.ElementAt(0).GetAttribute("value"); Console.WriteLine(male_radio); Radio_M_F.ElementAt(1).Click(); Fee_Male_radio = Radio_M_F.ElementAt(1).GetAttribute("value"); Console.WriteLine(Fee_Male_radio); //Phone number Hphone_strng = Hphone.GetAttribute("value"); Console.WriteLine(Hphone_strng); Hphone.Clear(); Hphone.SendKeys("9878564598"); Hpnone1_strng = Hphone.GetAttribute("value"); Console.WriteLine(Hpnone1_strng); //Permanent address P_Address_strng = P_Address.GetAttribute("value"); Console.WriteLine(P_Address_strng); //New Values P_Address.Clear(); P_Address.SendKeys("878# Street no5"); P_Address_strng1 = P_Address.GetAttribute("value"); Console.WriteLine(P_Address_strng1); //Permanent City P_City_Strng = P_City.GetAttribute("value"); Console.WriteLine(P_City_Strng); //New Values P_City.Clear(); P_City.SendKeys("Karachi"); P_City_Strng1 = P_City.GetAttribute("value"); Console.WriteLine(P_City_Strng1); //Permanent County P_County_Strng = P_County.GetAttribute("value"); Console.WriteLine(P_County_Strng); //New Values P_County.Clear(); P_County.SendKeys("County"); P_County_Strng1 = P_County.GetAttribute("value"); Console.WriteLine(P_County_Strng1); //Permanent State P_State_Strng = P_State.GetAttribute("value"); Console.WriteLine(P_State_Strng); //New Values P_State.Clear(); P_State.SendKeys("USA"); P_State_Strng1 = P_State.GetAttribute("value"); Console.WriteLine(P_State_Strng1); //ZipCode P_Zip_Strng = P_Zip.GetAttribute("value"); Console.WriteLine(P_Zip_Strng); //New Values P_Zip.Clear(); P_Zip.SendKeys("453454"); P_Zip_Strng1 = P_Zip.GetAttribute("value"); Console.WriteLine(P_Zip_Strng1); //MD_Number Md_No_strng = MD_Number.GetAttribute("value"); Console.WriteLine(Md_No_strng); //New Values MD_Number.Clear(); MD_Number.SendKeys("MD_9001"); Md_No_strng1 = P_Zip.GetAttribute("value"); Console.WriteLine(Md_No_strng1); //Email Address Email_Strng = Email_Adress.GetAttribute("value"); Console.WriteLine(Email_Strng); //New Values Email_Adress.Clear(); Email_Adress.SendKeys("*****@*****.**"); Email_Strng = Email_Adress.GetAttribute("value"); Console.WriteLine(Email_Strng1); //Pay List testing unchecked CheckBox Paylist_bool1 = Paylist.ElementAt(0).Selected; Paylist_bool2 = Paylist.ElementAt(1).Selected; Paylist_bool3 = Paylist.ElementAt(2).Selected; if (Paylist_bool1 == true || Paylist_bool2 == true || Paylist_bool3 == true) { if (Paylist_bool1 == true) { Paylist.ElementAt(0).Click(); } if (Paylist_bool2 == true) { Paylist.ElementAt(1).Click(); } if (Paylist_bool3 == true) { Paylist.ElementAt(2).Click(); } Asserts.Pay_list1(true); } if (Paylist_bool1 == false && Paylist_bool2 == false & Paylist_bool3 == false) { Asserts.Pay_list1(true); } //cliking on single paylist Paylist.ElementAt(0).Click(); Paylist_bool1 = Paylist.ElementAt(0).Selected; Paylist_bool2 = Paylist.ElementAt(1).Selected; Paylist_bool3 = Paylist.ElementAt(2).Selected; if (Paylist_bool1 == true && Paylist_bool2 == false & Paylist_bool3 == false) { Asserts.Pay_list(Paylist_bool1); } else { Asserts.Pay_list(false); } //Asertion for Records inrequired fields are changed or not if (Name_strng != Name_strng1 && LName_strng != LName_strng1 && MName_strng != MName_strng1 && Dob_strng != Dob_strng1 && P_Address_strng != P_Address_strng1 && P_City_Strng != P_City_Strng1 && P_State_Strng != P_State_Strng1 && male_radio != Fee_Male_radio && Md_No_strng != Md_No_strng1 && Email_Strng != Email_Strng1) { Asserts.En_Search_Create_pages_Fields_Edit(true); } else { Asserts.En_Search_Create_pages_Fields_Edit(false); } //Save Draft Console.WriteLine("Colorsss"); Save_Draft_Btn_Color = SaveDraft.ElementAt(0).GetCssValue("background-color"); Console.WriteLine(Save_Draft_Btn_Color + "Color"); Enroment_create_page_Url = Web_Driver.driver.Url; Console.WriteLine(Enroment_create_page_Url); SaveDraft.ElementAt(0).Click(); Save_Draft_Btn_Color1 = SaveDraft.ElementAt(0).GetCssValue("background-color"); Console.WriteLine(Save_Draft_Btn_Color1 + "Color-"); //Draft Button cliking verifying Asserts.Save_Draft(Save_Draft_Btn_Color, Save_Draft_Btn_Color1); Web_Driver.ngWebDriver.WaitForAngular(); Web_Driver.driver.Navigate().Refresh(); Enroment_Search_page_Url = Web_Driver.driver.Url; Console.WriteLine(Enroment_Search_page_Url); Asserts.En_Search_Create_pages_Url(Enroment_create_page_Url, Enroment_Search_page_Url); //Getting New Record Web_Driver.ngWebDriver.WaitForAngular(); //Search for Updated Enrolment Thread.Sleep(3000); Hash_Drop.ElementAt(0).Click(); //Search by Id Search_Records.ElementAt(0).Click(); Thread.Sleep(3000); Search_Records.ElementAt(0).SendKeys(Edit_Id); Thread.Sleep(3000); Search_btn.ElementAt(0).Click(); Thread.Sleep(3000); //Getting text of updated record Edit_Record_Updated = Edit_Record.Text; Console.WriteLine(Edit_Record_Updated + " Updated Record"); //Assertion For Edit Record check Asserts.Edit_Record_Update(Edit_Record_Previous, Edit_Record_Updated); return(new EA_POM()); }
public EA_POM Create_Enrolment() { Thread.Sleep(3000); // string[] vals = new string[] { "H7607-002-001", "H7607-002-002", "H7607-002-003", "H7607-003-001", "H7607-003-002", "H7607-003-003" }; En_Tab_Click.Click(); Thread.Sleep(3000); Pre_Id = Previous_ID_txt.ElementAt(0).Text; int.TryParse(Pre_Id, out Previous_ID); Create_En_btn.Click(); Url_Creat_En_page = Web_Driver.driver.Url; Asserts.Url_Create_En(Url_Creat_En_page, Url_En_page); Console.WriteLine(Url_Creat_En_page); Console.WriteLine(Url_En_page); //Plan radio button verifying for (int i = 0; i < Plan_Radio_btn.Count; i++) { try { Plan_Radio_btn.ElementAt(i).Click(); radio = Plan_Radio_btn.ElementAt(i).Selected; if (radio = Plan_Radio_btn.ElementAt(i).Selected) { // Console.WriteLine(Plan_Radio_btn.ElementAt(i).Selected + "Button clicked"); Asserts.Assert_Radiobtn(radio); } } catch { Asserts.Assert_Radiobtn(false); } } // List<string> list = new List<string>(); IList <IWebElement> rows = Web_Driver.driver.FindElements(By.XPath("//table[@class='table-responsive table-bordered']//tbody//tr")); for (int i = 3; i < 6; i++) { // Console.WriteLine(rows[i].Text); if (rows[i].Text == "H7607-002-001 Los Angeles" || rows[i].Text == "H7607-002-002 Orange" || rows[i].Text == "H7607-002-003 San Diego") { // Console.WriteLine(rows[i].Text); bool txtverified = true; Asserts.Assert_Plans(txtverified); } else { bool txtverified = false; Asserts.Assert_Plans(txtverified); } for (int j = 7; j < 10; j++) { //Console.WriteLine(rows[i].Text); if (rows[j].Text == "H7607-003-001 Los Angeles" || rows[j].Text == "H7607-003-002 Orange" || rows[j].Text == "H7607-003-003 San Diego") { // Console.WriteLine(rows[j].Text); bool txtverified = true; Asserts.Assert_Plans1(txtverified); } else { bool txtverified = false; Asserts.Assert_Plans1(txtverified); } } } //First name verified Name.SendKeys("Usama"); //Last name verified LName.SendKeys("Sohail"); //Middle name verified MName.SendKeys("Puma"); //Required Date Of Birth verified Dob.SendKeys("05/07/2020"); //Sex Male/FeeMale radio btns for (int i = 0; i < Radio_M_F.Count; i++) { try { Radio_M_F.ElementAt(i).Click(); radio_1 = Radio_M_F.ElementAt(i).Selected; if (radio_1 = Radio_M_F.ElementAt(i).Selected) { Console.WriteLine(Radio_M_F.ElementAt(i).Selected + "Button is clicked"); Asserts.Assert_Radiobtn(radio_1); } } catch { Asserts.Assert_Radiobtn(false); } } /// Entring Home Phone Hphone.SendKeys("5672348791"); //Entering Permanent Address P_Address.SendKeys("72 Health center"); //Entering Permanent City P_City.SendKeys("Lahore"); //Entering Permanent County P_County.SendKeys("Pak"); //Entering Permanent State P_State.SendKeys("Pakistan"); //Entering Permanent Zip P_Zip.SendKeys("315550"); //Mailing Adress CheckBox Mailing_Adress.Click(); checkbox = Mailing_Adress.Selected; if (checkbox == true) { Asserts.Mailing_Checkbox(true); } else { Asserts.Mailing_Checkbox(false); } //Entering data into street address input box Street_Adress.SendKeys("72 Health center street No 10"); //Entering data into Mailing City Mailing_City.SendKeys("Faisalabad"); //Entering data into Mailing State Mailing_State.SendKeys("England"); //Entering data into Mailing Zipcode Mailing_Zip.SendKeys("4532678"); //Entering data into MdNumber MD_Number.SendKeys("Md-9999"); //Entering data into AttorneName AttorneyName.SendKeys("Gul"); //Entering data into AttorneAdree AttorneyAddress.SendKeys("123 street near new clonoy 1"); //Entering data into Attorny Phone AttorneyPhone.SendKeys("2324445787"); //Entering data into Attorny Phone Attorneyrelation.SendKeys("Cousin"); for (int i = 0; i < Section_2_Checkbox2.Count; i++) { try { Section_2_Checkbox2.ElementAt(i).Click(); Section_2_checked1 = Section_2_Checkbox2.ElementAt(i).Selected; if (Section_2_checked1 = Section_2_Checkbox2.ElementAt(i).Selected) { Console.WriteLine(Section_2_Checkbox2.ElementAt(i).Selected + "Section 2 Button not clicked"); Asserts.Section2_Checkbox(Section_2_checked1); } } catch { Asserts.Section2_Checkbox(false); } { } } for (int i = 0; i < Section_2_Checkbox.Count; i++) { try { Section_2_Checkbox.ElementAt(i).Click(); Section_2_checked = Section_2_Checkbox.ElementAt(i).Selected; if (Section_2_checked = Section_2_Checkbox.ElementAt(i).Selected) { Console.WriteLine(Section_2_Checkbox.ElementAt(i).Selected + "Button not clicked"); Asserts.Assert_Radiobtn(Section_2_checked); } } catch { Asserts.Assert_Radiobtn(false); } { } } //Entring email address Email_Adress.SendKeys("*****@*****.**"); Premium_check.Click(); premium = Premium_check.Selected; if (premium == true) { Asserts.Section2_Checkbox(true); } else { Asserts.Section2_Checkbox(false); } for (int i = 0; i < Attestation.Count; i++) { try { Attestation.ElementAt(i).Click(); radio_2 = Attestation.ElementAt(i).Selected; if (radio_2 == true) { Console.WriteLine(Attestation.ElementAt(i).Selected + "Attestation Radio Button clicked"); Asserts.Assert_Radiobtn(radio_2); } } catch { Asserts.Assert_Radiobtn(false); } Genrete_Enrolment.ElementAt(1).Click(); Web_Driver.ngWebDriver.WaitForAngular(); Genrete_Enrolment_Yes_Btn.ElementAt(1).Click(); Web_Driver.ngWebDriver.WaitForAngular(); Genrete_Appoinment_Ok_Btn.ElementAt(1).Click(); Web_Driver.ngWebDriver.WaitForAngular(); Web_Driver.driver.Navigate().Refresh(); Web_Driver.ngWebDriver.WaitForAngular(); Up_Id = Created_ID_txt.ElementAt(0).Text; int.TryParse(Up_Id, out Updated_ID); Asserts.ID_Compare(Updated_ID, Previous_ID); Console.WriteLine(Previous_ID); Console.WriteLine(Updated_ID); } return(new EA_POM()); }
}// end of StandardPrintData private static void PekinPrintData() {// Pekin's data is not in the order it needs to print. // That's why it has it's own print method. string filler = " 000000000000000000000000000 00000000000000 0000000 H000000100 00000000000000 0000000 0000000000 "; int fillerlength = filler.Length; if (string.IsNullOrEmpty(TermDate)) { TermDate = " "; } object locker = new object(); //FldValue = FormatSpaces("", "R", 3);//Title FldValue += FormatSpaces("PRXPEK", "R", 9); //? FldValue += FormatSpaces("006", "R", 15); //? FldValue += FormatSpaces(GroupCode.Replace("?", ""), "R", 15); // GroupCode FldValue += FormatSpaces(UniqID.Replace("?", ""), "R", 18); //UniqID FldValue += FormatSpaces(SequenceNo + " ", "R", 3); //Sequence Number FldValue += FormatSpaces("1" + LName.Replace("?", ""), "R", 26); //LName FldValue += FormatSpaces(FName.Replace("?", ""), "R", 15); //FName FldValue += FormatSpaces(MidIni.Replace("?", ""), "R", 1); // Middle Initial FldValue += FormatSpaces(Gender.Replace("?", ""), "R", 1); //Gender FldValue += FormatSpaces(DOB + "0", "R", 9); //DOB FldValue += FormatSpaces(" 1Y A00032773", "R", 30); // No idea what any of this is. FldValue += FormatSpaces(Regex.Replace(Addr1, "[?]", ""), "R", 25); //Addr1 FldValue += FormatSpaces(Regex.Replace(Addr2, "[?]", ""), "R", 15); //Addr2 FldValue += FormatSpaces(Regex.Replace(City, "[?]", ""), "R", 20); //City FldValue += FormatSpaces(Regex.Replace(State, "[?]", ""), "R", 2); //State FldValue += FormatSpaces(Zip.Replace("?", ""), "R", 11); //Zip FldValue += FormatSpaces("USA ", "R", 4); //USA? FldValue += FormatSpaces("0000000000 ", "R", 11); //Supposed to be home phone. FldValue += FormatSpaces("0A00032773 ", "R", 19); //Don't know what this is. FldValue += FormatSpaces("00000000000000", "R", 14); //Don't know what this is. FldValue += FormatSpaces(EffDate, "R", 7); //EffDate FldValue += FormatSpaces(TermDate, "R", 7); //TermDate FldValue += FormatSpaces(filler, "R", 323); //TermDate // FldValue += FormatSpaces(SSN.Replace("?", ""), "R", 9);//SSN // FldValue += FormatHPSZip(Zip.Replace("?", ""), "R", 9);//Zip //else // FldValue += FormatSpaces(Zip.Replace("?", ""), "R", 5);//Zip //if (!HPS && !PEK) // FldValue += FormatSpaces(Zip4.Replace("?", ""), "R", 4);//Zip4 //FldValue += FormatSpaces(HomePhone, "R", 10);//Homephone //FldValue += FormatSpaces(" ", "R", 10);// worksphone //FldValue += FormatSpaces(" ", "R", 2);// Coverage //if (HPS) // FldValue += FormatSpaces(GroupCode.Replace("?", ""), "R", 12);// GroupCode //else //FldValue += FormatSpaces("HLTHSPRNG", "R", 12);// GroupCode //if (HPS) // FldValue += FormatSpaces(Relation.Replace("?", ""), "R", 1);//Relation //else // FldValue += FormatSpaces(" ", "R", 1);//Relation //FldValue += FormatSpaces(" ", "R", 1);//StudentStatus //if (HPS) // FldValue += FormatSpaces(PaidThruDT, "R", 8);// PaidThruDate for HPS //else // FldValue += FormatSpaces(" ", "R", 4);// Plan for Healthsprings try { if (File.Exists(OutputStream)) { using (StreamWriter sw = File.AppendText(OutputStream)) { if (FName != "" && LName != "") { sw.WriteLine(FldValue); } sw.Flush(); } } else { using (StreamWriter sw = File.CreateText(OutputStream)) { if (FName != "" && LName != "") { sw.WriteLine(FldValue); } sw.Flush(); } } }// end try catch (IOException ex) { MessageBox.Show(ex.Message); } FName = ""; LName = ""; MidIni = ""; UniqID = ""; SSN = ""; Addr1 = ""; Addr2 = ""; City = ""; State = ""; Zip = ""; Zip4 = ""; HomePhone = ""; GroupCode = ""; TermDate = ""; EffDate = ""; PaidThruDT = ""; DOB = ""; Relation = ""; Gender = ""; }// end of PekinPrintData
}// end of PekinFormatDate private static void StandardPrintData() {// This is the standard Careington File Layout //if (BOON) // GroupCode = "BOON-DN11"; if (String.IsNullOrEmpty(GroupCode)) { GroupCode = " "; } object locker = new object(); FldValue = FormatSpaces(" ", "R", 3); //Title FldValue += FormatSpaces(FName.Replace("?", ""), "R", 15); //FName FldValue += FormatSpaces(MidIni.Replace("?", ""), "R", 1); // Middle Initial FldValue += FormatSpaces(LName.Replace("?", ""), "R", 20); //LName FldValue += FormatSpaces(" ", "R", 4); //PostName FldValue += FormatSpaces(UniqID.Replace("?", ""), "R", 12); //UniqID FldValue += FormatSpaces(SequenceNo, "R", 2); //Sequence Number FldValue += FormatSpaces(SSN, "R", 9); //SSN FldValue += FormatSpaces(Regex.Replace(Addr1, "[?]", ""), "R", 33); //Addr1 FldValue += FormatSpaces(Regex.Replace(Addr2, "[?]", ""), "R", 33); //Addr2 FldValue += FormatSpaces(Regex.Replace(City, "[?]", ""), "R", 21); //City FldValue += FormatSpaces(Regex.Replace(State, "[?]", ""), "R", 2); //State FldValue += FormatSpaces(Zip.Replace("?", ""), "R", 9); //Zip FldValue += FormatSpaces(HomePhone, "R", 10); //HomePhone FldValue += FormatSpaces(" ", "R", 10); //WorkPhone FldValue += FormatSpaces(" ", "R", 2); //Coverage FldValue += FormatSpaces(GroupCode.Replace("?", ""), "R", 12); // GroupCode FldValue += FormatSpaces(TermDate, "R", 8); //TermDate FldValue += FormatSpaces(EffDate, "R", 8); //EffDate FldValue += FormatSpaces(DOB, "R", 8); //DOB FldValue += FormatSpaces(Relation, "R", 1); //Relation FldValue += FormatSpaces(" ", "R", 1); //StudentStatus FldValue += FormatSpaces(" ", "R", 4); //Plan FldValue += FormatSpaces(Gender.Replace("?", ""), "R", 1); //Gender try { if (File.Exists(OutputStream)) { using (StreamWriter sw = File.AppendText(OutputStream)) { if (FName != "" && LName != "") { sw.WriteLine(FldValue); } sw.Flush(); } } else { using (StreamWriter sw = File.CreateText(OutputStream)) { if (FName != "" && LName != "") { sw.WriteLine(FldValue); } sw.Flush(); } } }// end try catch (IOException ex) { MessageBox.Show(ex.Message); } FName = ""; LName = ""; MidIni = ""; UniqID = ""; SSN = ""; Addr1 = ""; Addr2 = ""; City = ""; State = ""; Zip = ""; Zip4 = ""; HomePhone = ""; GroupCode = ""; TermDate = ""; EffDate = ""; PaidThruDT = ""; DOB = ""; Relation = ""; Gender = ""; }// end of StandardPrintData
}// end of PekinPrintData private static void PrintData() { object locker = new object(); FldValue = FormatSpaces("", "R", 3); //Title FldValue += FormatSpaces(FName.Replace("?", ""), "R", 15); //FName FldValue += FormatSpaces(MidIni.Replace("?", ""), "R", 1); // Middle Initial FldValue += FormatSpaces(LName.Replace("?", ""), "R", 20); //LName FldValue += FormatSpaces("", "R", 4); // Post Name FldValue += FormatSpaces(UniqID.Replace("?", ""), "R", 12); //UniqID //FldValue += FormatSpaces(" ", "R", 2);//Sequence Number FldValue += FormatSpaces(SequenceNo.Replace("?", "00"), "R", 2); //Sequence Number Healthsprings doesn't have deps. FldValue += FormatSpaces(SSN.Replace("?", ""), "R", 9); //SSN FldValue += FormatSpaces(Regex.Replace(Addr1, "[?]", ""), "R", 33); //Addr1 I can add more special chars, no commas between. FldValue += FormatSpaces(Regex.Replace(Addr2, "[?]", ""), "R", 33); //Addr2 FldValue += FormatSpaces(Regex.Replace(City, "[?]", ""), "R", 21); //City FldValue += FormatSpaces(Regex.Replace(State, "[?]", ""), "R", 2); //State if (HPS) { FldValue += FormatHPSZip(Zip.Replace("?", ""), "R", 9);//Zip } else { FldValue += FormatSpaces(Zip.Replace("?", ""), "R", 5);//Zip } if (!HPS && !PEK) { FldValue += FormatSpaces(Zip4.Replace("?", ""), "R", 4); //Zip4 } FldValue += FormatSpaces(HomePhone, "R", 10); //Homephone FldValue += FormatSpaces(" ", "R", 10); // worksphone FldValue += FormatSpaces(" ", "R", 2); // Coverage if (HPS) { FldValue += FormatSpaces(GroupCode.Replace("?", ""), "R", 12);// GroupCode } else { FldValue += FormatSpaces("HLTHSPRNG", "R", 12); // GroupCode } FldValue += FormatSpaces(TermDate, "R", 8); //TermDate FldValue += FormatSpaces(EffDate, "R", 8); //EffDate FldValue += FormatSpaces(DOB, "R", 8); //DOB if (HPS) { FldValue += FormatSpaces(Relation.Replace("?", ""), "R", 1);//Relation } else { FldValue += FormatSpaces(" ", "R", 1); //Relation } FldValue += FormatSpaces(" ", "R", 1); //StudentStatus if (HPS) { FldValue += FormatSpaces(PaidThruDT, "R", 8);// PaidThruDate for HPS } else { FldValue += FormatSpaces(" ", "R", 4); // Plan for Healthsprings } FldValue += FormatSpaces(Gender.Replace("?", ""), "R", 1); //Gender try { if (File.Exists(OutputStream)) { using (StreamWriter sw = File.AppendText(OutputStream)) { if (LName != "") { sw.WriteLine(FldValue); } sw.Flush(); } } else { using (StreamWriter sw = File.CreateText(OutputStream)) { if (LName != "") { sw.WriteLine(FldValue); } sw.Flush(); } } }// end try catch (IOException ex) { MessageBox.Show(ex.Message); } FName = ""; LName = ""; MidIni = ""; UniqID = ""; SSN = ""; Addr1 = ""; Addr2 = ""; City = ""; State = ""; Zip = " "; Zip4 = " "; HomePhone = ""; GroupCode = ""; TermDate = ""; EffDate = ""; PaidThruDT = ""; DOB = ""; Relation = ""; Gender = ""; }// end of PrintData
override public int GetHashCode() { return(FName.GetHashCode() + LName.GetHashCode() + Studies.GetHashCode() + Id.GetHashCode() + BirthDate.GetHashCode() + Email.GetHashCode() + MothersName.GetHashCode() + FathersName.GetHashCode()); }
/* * MethodName: ToString() * ReturnType: string * Summary: Prints the attributes of the object as a string in the specified format. */ public override string ToString() { Program obj = new Program(); return("z" + obj.Temp.ToString().PadRight(6, ' ') + " -- " + FName.PadLeft(12, ' ') + ", " + LName.PadRight(10, ' ') + "[" + Acdyear.ToString().PadRight(10, ' ') + "] " + "(" + Major.PadRight(15, ' ') + ") " + " | " + String.Format("{0:0.000}", GPA) + " |"); }
public void FillFormForDiscipline(string discipline, string examinationNumber, string examinationName, string appleant, string fName, string mName, string lName, string aka, string lastFourSSN, string contactPhone, string mailingAddress, string city, string state, string zip, string email, string cEmail, string empNumber, string payroll, string department, string appealIssue, string notificationDocument, string attachmentDesciption, string classificationDoc, string ClassificationDocDesc, string remedy ) { // SubmitAppeal.Clicks(); BtnIAgree.Clicks(); DisciplineHeadingID.Clicks(); if (discipline.Contains("1-5 day Suspension") || discipline.Contains("LayOff") || discipline.Contains("Probationary Discharge") || discipline.Contains("Probationary Reduction") || discipline.Contains("Reduction due to Lay-Off") || discipline.Contains("Release From Temporary Employment") || discipline.Contains("Transfer") || discipline.Contains("Resignation")) { if (discipline.Contains("1-5 day Suspension")) { Suspension.Clicks(); } else if (discipline.Contains("LayOff")) { LayOff.Clicks(); } else if (discipline.Contains("Probationary Discharge")) { ProbationaryDischarge.Clicks(); } else if (discipline.Contains("Probationary Reduction")) { ProbationaryReduction.Clicks(); } else if (discipline.Contains("Reduction due to Lay-Off")) { ReductionDueToLayOff.Clicks(); } else if (discipline.Contains("Release From Temporary Employment")) { ReleaseFromTemporaryEmployment.Clicks(); } else if (discipline.Contains("Transfer")) { Transfer.Clicks(); } else if (discipline.Contains("Resignation")) { Resignation.Clicks(); } if (appleant.Contains("Yourself")) { FillingYourSelf.Click(); } FName.EnterText(fName); MName.EnterText(mName); LName.EnterText(lName); Aka.EnterText(aka); LastFourSSN.EnterText(lastFourSSN); ContactPhone.EnterText(contactPhone); MailingAddress.EnterText(mailingAddress); City.EnterText(city); State.ClearText(state); ZipCode.EnterText(zip); PreferredEmail.EnterText(email); ConfirmEmail.EnterText(cEmail); EmployeeNumber.EnterText(empNumber); Payroll.EnterText(payroll); EmployingDepartment.EnterText(department); AppealIssue.EnterText(appealIssue); Attach.Clicks(); Browse.UploadFile(notificationDocument); AttachmentDescription.EnterText(attachmentDesciption); Remedy.SendKeys(remedy); SubmitBtn.Clicks(); AcceptPopupBtn.Clicks(); } else if (discipline.Contains("ClassificationStudy")) { ClassificationStudy.Clicks(); ExaminationNumber.SendKeys(examinationNumber); ExaminationName.SendKeys(examinationName); if (appleant == "Yourself") { FillingYourSelf.Click(); } FName.EnterText(fName); MName.EnterText(mName); LName.EnterText(lName); Aka.EnterText(aka); LastFourSSN.EnterText(lastFourSSN); ContactPhone.EnterText(contactPhone); MailingAddress.EnterText(mailingAddress); City.EnterText(city); State.ClearText(state); ZipCode.EnterText(zip); PreferredEmail.EnterText(email); ConfirmEmail.EnterText(cEmail); EmployeeNumber.EnterText(empNumber); Payroll.EnterText(payroll); EmployingDepartment.EnterText(department); AppealIssue.EnterText(appealIssue); Attach.Clicks(); Browse.UploadFile(notificationDocument); AttachmentDescription.EnterText(attachmentDesciption); AttachAdditional.Clicks(); BrowseAdditional.UploadFile(classificationDoc); DescriptionAdditional.EnterText(ClassificationDocDesc); Remedy.SendKeys(remedy); SubmitBtn.Clicks(); AcceptPopupBtn.Clicks(); } }
private void UserRoleDropdown_ValueChanged(object sender, ValueChangedEventArgs e) { //i hate firebase if (isDataSent) { return; } //FName, LName, Mname, ContactName, Phone, Address, DOB, State, Zip reference.Child("Patient").Child(MainController.name).Child("address").SetValueAsync(Address.ToString()); reference.Child("Patient").Child(MainController.name).Child("state").SetValueAsync(State.ToString()); reference.Child("Patient").Child(MainController.name).Child("zipCode").SetValueAsync(Zip.ToString()); reference.Child("Patient").Child(MainController.name).Child("dateOfBirth").SetValueAsync(DOB.ToString()); reference.Child("Patient").Child(MainController.name).Child("emergencyContact").SetValueAsync(ContactName.ToString()); reference.Child("Patient").Child(MainController.name).Child("firstName").SetValueAsync(FName.ToString()); reference.Child("Patient").Child(MainController.name).Child("middleName").SetValueAsync(Mname.ToString()); reference.Child("Patient").Child(MainController.name).Child("lastName").SetValueAsync(LName.ToString()); reference.Child("Patient").Child(MainController.name).Child("phoneNumber").SetValueAsync(Phone.ToString()); message.text = "Account successfully updated."; isDataSent = true; /* * reference.Child("Patient").Child(MainController.name).SetValueAsync(UserName.text); * reference.Child("Patient").Child(UserName.text).Child("Username").SetValueAsync(UserName.text); * reference.Child("Patient").Child(UserName.text).Child("Role").SetValueAsync(RoleValue); * reference.Child("Patient").Child(UserName.text).Child("Password").SetValueAsync(Password.text); * reference.Child("Patient").Child(UserName.text).Child("DoB").SetValueAsync(DOB.text); * reference.Child("Patient").Child(UserName.text).Child("EmergencyContact").SetValueAsync("911"); * print("added to db"); * * message.text = "Account successfully updated."; * isDataSent = true; * */ }
public void FillFormForPosition(string examinationPosition, string examinationNumber, string examinationName, string appleant, string fName, string mName, string lName, string aka, string lastFourSSN, string contactPhone, string mailingAddress, string city, string state, string zip, string email, string cEmail, string empNumber, string payroll, string department, string appealIssue, string document, string attachmentDesciption, string remedy ) { // SubmitAppeal.Clicks(); BtnIAgree.Clicks(); PositionHeadingID.Clicks(); if (examinationPosition == "Application Reject") { ApplicationRejection.Clicks(); } else if (examinationPosition == "Appraisal of Promotability") { AppraisalOfPromotability.Clicks(); } else if (examinationPosition == "Evaluation of Training and Experience") { EvaluationOfTraining.Clicks(); } else if (examinationPosition == "Interview") { Interview.Clicks(); } else if (examinationPosition == "Performance Test") { PerformanceTest.Clicks(); } else if (examinationPosition == "Veteran Credit") { VeteranCredit.Clicks(); } else if (examinationPosition == "Paper-and-Pencil Written Tests") { WrittenTests.Clicks(); } else if (examinationPosition == "Computer-Administered Tests") { ComputerAdministeredTests.Clicks(); } ExaminationNumber.SendKeys(examinationNumber); ExaminationName.SendKeys(examinationName); if (appleant == "Yourself") { FillingYourSelf.Click(); } FName.EnterText(fName); MName.EnterText(mName); LName.EnterText(lName); Aka.EnterText(aka); LastFourSSN.EnterText(lastFourSSN); ContactPhone.EnterText(contactPhone); MailingAddress.EnterText(mailingAddress); City.EnterText(city); State.ClearText(state); ZipCode.EnterText(zip); PreferredEmail.EnterText(email); ConfirmEmail.EnterText(cEmail); EmployeeNumber.EnterText(empNumber); Payroll.EnterText(payroll); EmployingDepartment.EnterText(department); AppealIssue.EnterText(appealIssue); Attach.Clicks(); Browse.UploadFile(document); AttachmentDescription.EnterText(attachmentDesciption); Remedy.SendKeys(remedy); SubmitBtn.Clicks(); AcceptPopupBtn.Clicks(); }
//CREATE THE ACCOUNT public async Task CreateAccount() { IsBusy = true; EnableAddButton = false; _manager = new ServiceManager(); var user = new User() { UserName = NewUserName, PassWord = NewPassword, FirstName = FName, LastName = LName.TrimStart(), Email = Email }; try { var rez = await _manager.CreateAccountAsync(user); //Show ackowledgement DependencyService.Get <IMessage>().ShowSnackbar("Account Created! Please Log In To Continue."); //Show Login Screen ShowView(ViewAction.Login.ToString()); } catch (Exception ex) { //TODO LOG THIS DependencyService.Get <IMessage>().ShowSnackbar("Sorry, Could not create your account at this time."); } finally{ IsBusy = false; EnableAddButton = true; } }