public static void eReg_EncryptionConsent() { //*****************/ //Create browserwindow /*****************/ BrowserWindow browind = new BrowserWindow(); browind.SearchProperties[UITestControl.PropertyNames.Name] = "Encryption Consent"; //Verify References pane is available HtmlControl EncryptionConsentPane = new HtmlControl(browind); EncryptionConsentPane.FilterProperties[HtmlDiv.PropertyNames.InnerText] = "Encryption Consent"; // CheckBox I have read, understand, and agree to the policy above. //check checkbox HtmlCheckBox checkBox = new HtmlCheckBox(browind); checkBox.SearchProperties[HtmlCheckBox.PropertyNames.Id] = "encrypt_consent_ack"; checkBox.DrawHighlight(); Mouse.Click(checkBox); //chkBox.DrawHighlight(); if (checkBox.Checked == true) { //Verify SaveNContinue button is Enable Assert.IsTrue(checkBox.Enabled); checkBox.SetProperty(HtmlCheckBox.PropertyNames.Checked, true); Mouse.Click(checkBox); } else { Assert.IsTrue(checkBox.Enabled, "I have read, understand, and agree to the policy above"); } /*****************/ /* Progress Meter*/ /*****************/ HtmlCustom progress = new HtmlCustom(browind); progress.SearchProperties[HtmlCustom.PropertyNames.Id] = "progressmeter"; progress.DrawHighlight(); bool availabilty = (bool)progress.GetProperty(HtmlCustom.PropertyNames.Exists); string workflowEvent = PersonalInformation1.ReadData(1, "WORKFLOW"); if (workflowEvent == "S1PROSPECT") { Assert.IsTrue(availabilty, "Progress Meter is not showing"); HtmlSpan bar = new HtmlSpan(browind); bar.SearchProperties[HtmlSpan.PropertyNames.Id] = "progressmeterdiv"; bar.DrawHighlight(); string percentage = (string)bar.GetProperty(HtmlSpan.PropertyNames.InnerText); Assert.AreEqual(percentage, "95%"); } else { Assert.IsFalse(availabilty, "Progress Meter is showing"); } //Click button Save And Continue HtmlSpan SaveAndContinue = new HtmlSpan(browind); SaveAndContinue.SearchProperties[HtmlSpan.PropertyNames.Id] = "ForwardButton_button"; // SaveAndCountinue.DrawHighlight(); Mouse.Click(SaveAndContinue); browind.WaitForControlReady(2000); }
public static void eReg_WorkExperiance() { //Create browserwindow BrowserWindow browind = new BrowserWindow(); browind.SearchProperties[UITestControl.PropertyNames.Name] = "Work Experience"; // Is this employer a staffing company? HtmlComboBox empstaff = new HtmlComboBox(browind); empstaff.SearchProperties[HtmlComboBox.PropertyNames.Id] = "Employer1_staffingBox"; //empstaff.DrawHighlight(); //Employer (If you worked through a staffing company, enter the Staffing Company name as the Employer) HtmlEdit employer = new HtmlEdit(browind); employer.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_name"; //employer.DrawHighlight(); //Current or Former Employer? HtmlComboBox currentemp = new HtmlComboBox(browind); currentemp.SearchProperties[HtmlComboBox.PropertyNames.Id] = "Employer1_type"; //currentemp.DrawHighlight(); //Job Title HtmlEdit jobtitle = new HtmlEdit(browind); jobtitle.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_jobtitle"; //jobtitle.DrawHighlight(); //Pay Rate/Salary xx.xx HtmlEdit empsal = new HtmlEdit(browind); empsal.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_salary"; //empsal.DrawHighlight(); //Pay Frequency HtmlComboBox emprate = new HtmlComboBox(browind); emprate.SearchProperties[HtmlComboBox.PropertyNames.Id] = "Employer1_rate"; // emprate.DrawHighlight(); //Start Date mm/yyyy HtmlEdit empstart = new HtmlEdit(browind); empstart.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_start"; //empstart.DrawHighlight(); //End Date mm/yyyy HtmlEdit empend = new HtmlEdit(browind); empend.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_end"; //empend.DrawHighlight(); //Supervisor/Manager Name HtmlEdit supename = new HtmlEdit(browind); supename.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_supename"; //supename.DrawHighlight(); //Mouse.MoveScrollWheel(-100); //Supervisor/Manager Title HtmlEdit suptitle = new HtmlEdit(browind); suptitle.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_supetitle"; //suptitle.DrawHighlight(); //Address HtmlEdit empadd = new HtmlEdit(browind); empadd.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_address"; //empadd.DrawHighlight(); //City HtmlEdit empcity = new HtmlEdit(browind); empcity.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_city"; //empcity.DrawHighlight(); //State/Prov. HtmlComboBox empstate = new HtmlComboBox(browind); empstate.SearchProperties[HtmlComboBox.PropertyNames.Id] = "Employer1_state"; // empstate.DrawHighlight(); //Postal/ZIP Code HtmlEdit empzip = new HtmlEdit(browind); empzip.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_zip"; //empzip.DrawHighlight(); //Country HtmlComboBox empcountry = new HtmlComboBox(browind); empcountry.SearchProperties[HtmlComboBox.PropertyNames.Id] = "Employer1_country"; //empcountry.DrawHighlight(); //Area Code HtmlEdit areacode = new HtmlEdit(browind); areacode.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_phone_areacode"; // areacode.DrawHighlight(); //Phone HtmlEdit empphone = new HtmlEdit(browind); empphone.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_phone"; //empphone.DrawHighlight(); //Ext. HtmlEdit empext = new HtmlEdit(browind); empext.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_ext"; //empext.DrawHighlight(); //Job Duties (2000 characters max) HtmlEdit duties = new HtmlEdit(browind); duties.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_duties"; duties.SearchProperties[HtmlEdit.PropertyNames.TagName] = "TEXTAREA"; //duties.DrawHighlight(); //Reason for leaving? HtmlEdit leaving = new HtmlEdit(browind); leaving.SearchProperties[HtmlEdit.PropertyNames.Id] = "Employer1_leaving"; //leaving.DrawHighlight(); // Verify any WorkExperience is exist //Click on Delete HtmlHyperlink empdel = new HtmlHyperlink(browind); empdel.SearchProperties[HtmlHyperlink.PropertyNames.InnerText] = "Delete"; while (empdel.TryFind()) { Mouse.MoveScrollWheel(-100); Mouse.Click(empdel); browind.WaitForControlReady(200); } //Fill up mandatory field and click "Add and Update" button empstaff.SetProperty(HtmlComboBox.PropertyNames.SelectedItem, "No"); employer.SetProperty(HtmlEdit.PropertyNames.Text, "Kelly Services"); currentemp.SetProperty(HtmlComboBox.PropertyNames.SelectedItem, "Current Employer"); jobtitle.SetProperty(HtmlEdit.PropertyNames.Text, "Senior QA Analyst"); empsal.SetProperty(HtmlEdit.PropertyNames.Text, "4000.00"); emprate.SetProperty(HtmlComboBox.PropertyNames.SelectedItem, "Monthly"); empstart.SetProperty(HtmlEdit.PropertyNames.Text, "01/2006"); empend.SetProperty(HtmlEdit.PropertyNames.Text, "08/2012"); empcity.SetProperty(HtmlEdit.PropertyNames.Text, "Detroit"); empstate.SetProperty(HtmlComboBox.PropertyNames.SelectedItem, "Michigan"); //Click on Add and Update HtmlInputButton addupdate = new HtmlInputButton(browind); addupdate.SearchProperties[HtmlInputButton.PropertyNames.Id] = "SaveRecordButton_button"; addupdate.DrawHighlight(); Mouse.Click(addupdate); /*****************/ /* Progress Meter*/ /*****************/ HtmlCustom progress = new HtmlCustom(browind); progress.SearchProperties[HtmlCustom.PropertyNames.Id] = "progressmeter"; progress.DrawHighlight(); bool availabilty = (bool)progress.GetProperty(HtmlCustom.PropertyNames.Exists); string workflowEvent = PersonalInformation1.ReadData(1, "WORKFLOW"); if (workflowEvent == "S1PROSPECT") { Assert.IsTrue(availabilty, "Progress Meter is not showing"); HtmlSpan bar = new HtmlSpan(browind); bar.SearchProperties[HtmlSpan.PropertyNames.Id] = "meterlabel"; bar.DrawHighlight(); string percentage = (string)bar.GetProperty(HtmlSpan.PropertyNames.InnerText); Assert.AreEqual(percentage, "45%"); } else { Assert.IsFalse(availabilty, "Progress Meter is showing"); } //Button "Save And Continue" HtmlInputButton SaveNContinue = new HtmlInputButton(browind); SaveNContinue.SearchProperties[HtmlInputButton.PropertyNames.Id] = "ForwardButton_button"; SaveNContinue.DrawHighlight(); Mouse.Click(SaveNContinue); }
public static void eReg_Reference() { /*****************/ //Create browserwindow /*****************/ BrowserWindow browind = new BrowserWindow(); browind.SearchProperties[UITestControl.PropertyNames.Name] = "References"; //Verify References pane is available HtmlControl ReferencesPane = new HtmlControl(browind); ReferencesPane.FilterProperties[HtmlDiv.PropertyNames.InnerText] = "References"; // References 1 /*References1 Name*/ HtmlSpan Reference1Name = new HtmlSpan(browind); Reference1Name.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref1_name"; Reference1Name.DrawHighlight(); //Reference1 Type HtmlComboBox Ref1type = new HtmlComboBox(browind); Ref1type.SearchProperties[HtmlComboBox.PropertyNames.Id] = "Ref1_type"; Ref1type.DrawHighlight(); // string ReferenceType = (string)Ref1type.GetProperty(HtmlComboBox.PropertyNames.SelectedItem); //Ref1 Current Title HtmlSpan RefTitle = new HtmlSpan(browind); RefTitle.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref1_title"; RefTitle.DrawHighlight(); //Ref1 Company Name HtmlSpan Ref1CompanyName = new HtmlSpan(browind); Ref1CompanyName.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref1_company"; Ref1CompanyName.DrawHighlight(); //Ref1 Location (City, State/Prov, and Country) HtmlSpan RefLocation = new HtmlSpan(browind); RefLocation.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref1_location"; RefLocation.DrawHighlight(); //Ref1Area Code HtmlSpan RefAreaCode = new HtmlSpan(browind); RefAreaCode.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref1_phone_areacode"; RefAreaCode.DrawHighlight(); //Ref1 Phone HtmlSpan Ref1Phone = new HtmlSpan(browind); Ref1Phone.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref1_phone"; Ref1Phone.DrawHighlight(); //Ref1 Phone Ext HtmlSpan Ref1PhoneExt = new HtmlSpan(browind); Ref1PhoneExt.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref1_ext"; Ref1PhoneExt.DrawHighlight(); //Ref1 Fax No HtmlSpan Ref1FaxNo = new HtmlSpan(browind); Ref1FaxNo.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref1_fax"; Ref1FaxNo.DrawHighlight(); //Ref1 Email Address HtmlSpan Ref1EmailAddress = new HtmlSpan(browind); Ref1EmailAddress.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref1_email"; Ref1EmailAddress.DrawHighlight(); //******************* // References 2 //******************* /*References2 Name*/ HtmlSpan Reference2Name = new HtmlSpan(browind); Reference2Name.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref2_name"; Reference2Name.DrawHighlight(); //Reference2 Type HtmlComboBox Ref2type = new HtmlComboBox(browind); Ref2type.SearchProperties[HtmlComboBox.PropertyNames.Id] = "Ref2_type"; Ref2type.DrawHighlight(); // string eRegstate = (string)Ref2type.GetProperty(HtmlComboBox.PropertyNames.SelectedItem); //Ref2 Current Title HtmlSpan Ref2Title = new HtmlSpan(browind); Ref2Title.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref2_title"; Ref2Title.DrawHighlight(); //Ref2 Company Name HtmlSpan Ref2CompanyName = new HtmlSpan(browind); Ref2CompanyName.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref2_company"; Ref2CompanyName.DrawHighlight(); //Ref2 Location (City, State/Prov, and Country) HtmlSpan Ref2Location = new HtmlSpan(browind); Ref2Location.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref2_location"; Ref2Location.DrawHighlight(); //Ref2 Area Code HtmlSpan Ref2AreaCode = new HtmlSpan(browind); Ref2AreaCode.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref2_phone_areacode"; Ref2AreaCode.DrawHighlight(); //Ref2 Phone HtmlSpan Ref2Phone = new HtmlSpan(browind); Ref2Phone.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref2_phone"; Ref2Phone.DrawHighlight(); //Ref2 Phone Ext HtmlSpan Ref2PhoneExt = new HtmlSpan(browind); Ref2PhoneExt.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref2_ext"; Ref2PhoneExt.DrawHighlight(); //Ref2 Fax No HtmlSpan Ref2FaxNo = new HtmlSpan(browind); Ref2FaxNo.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref2_fax"; Ref2FaxNo.DrawHighlight(); //Ref2 Email Address HtmlSpan Ref2EmailAddress = new HtmlSpan(browind); Ref2EmailAddress.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref2_email"; Ref2EmailAddress.DrawHighlight(); //******************* // References 3 //******************* /*References3 Name*/ HtmlSpan Reference3Name = new HtmlSpan(browind); Reference3Name.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref3_name"; Reference1Name.DrawHighlight(); //Reference3 Type HtmlComboBox Ref3type = new HtmlComboBox(browind); Ref3type.SearchProperties[HtmlComboBox.PropertyNames.Id] = "Ref3_type"; Ref3type.DrawHighlight(); // string eRegstate = (string)Ref3type.GetProperty(HtmlComboBox.PropertyNames.SelectedItem); //Ref3 Current Title HtmlSpan Ref3Title = new HtmlSpan(browind); Ref3Title.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref3_title"; Ref3Title.DrawHighlight(); //Ref3 Company Name HtmlSpan Ref3CompanyName = new HtmlSpan(browind); Ref3CompanyName.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref3_company"; Ref3CompanyName.DrawHighlight(); //Ref3 Location (City, State/Prov, and Country) HtmlSpan Ref3Location = new HtmlSpan(browind); Ref3Location.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref3_location"; Ref3Location.DrawHighlight(); //Ref3 Area Code HtmlSpan Ref3AreaCode = new HtmlSpan(browind); Ref3AreaCode.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref3_phone_areacode"; Ref3AreaCode.DrawHighlight(); //Ref3 Phone HtmlSpan Ref3Phone = new HtmlSpan(browind); Ref3Phone.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref3_phone"; Ref3Phone.DrawHighlight(); //Ref3 Phone Ext HtmlSpan Ref3PhoneExt = new HtmlSpan(browind); Ref3PhoneExt.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref3_ext"; Ref3PhoneExt.DrawHighlight(); //Ref3 Fax No HtmlSpan Ref3FaxNo = new HtmlSpan(browind); Ref3FaxNo.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref3_fax"; Ref3FaxNo.DrawHighlight(); //Ref3 Email Address HtmlSpan Ref3EmailAddress = new HtmlSpan(browind); Ref3EmailAddress.SearchProperties[HtmlSpan.PropertyNames.InnerText] = "Ref3_email"; Ref3EmailAddress.DrawHighlight(); /*****************/ /* Progress Meter*/ /*****************/ HtmlCustom progress = new HtmlCustom(browind); progress.SearchProperties[HtmlCustom.PropertyNames.Id] = "progressmeter"; progress.DrawHighlight(); bool availabilty = (bool)progress.GetProperty(HtmlCustom.PropertyNames.Exists); string workflowEvent = PersonalInformation1.ReadData(1, "WORKFLOW"); if (workflowEvent == "S1PROSPECT") { Assert.IsTrue(availabilty, "Progress Meter is not showing"); HtmlSpan bar = new HtmlSpan(browind); bar.SearchProperties[HtmlSpan.PropertyNames.Id] = "meterdiv"; bar.DrawHighlight(); string percentage = (string)bar.GetProperty(HtmlSpan.PropertyNames.InnerText); Assert.AreEqual(percentage, "55%"); } else { Assert.IsFalse(availabilty, "Progress Meter is showing"); } //Click button Save And Continue HtmlSpan SaveAndCountinue = new HtmlSpan(browind); SaveAndCountinue.SearchProperties[HtmlSpan.PropertyNames.Id] = "ForwardButton_button"; SaveAndCountinue.DrawHighlight(); Mouse.Click(SaveAndCountinue); browind.WaitForControlReady(2000); }