예제 #1
0
 public XAuth()
 {
     Test = new Clickable("ctl00_cphDialog_xAuth_btnTest", LocateBy.Id);
     OK = new Clickable("ctl00_cphDialog_saveForm", LocateBy.Id);
     ServiceEndpointURL = new Input("ctl00_cphDialog_xAuth_txtEndpointUrl", LocateBy.Id);
     MessageToRegistration = new Input("ctl00_cphDialog_xAuth_txtMessageToRegistrant", LocateBy.Id);
     TestEmail = new Input("ctl00_cphDialog_xAuth_txtTestEmailAddress", LocateBy.Id);
     TestUserName = new Input("ctl00_cphDialog_xAuth_txtTestUserName", LocateBy.Id);
     TestPassword = new Input("ctl00_cphDialog_xAuth_txtTestPassword", LocateBy.Id);
     DescriptionForIdentifer = new Input("ctl00_cphDialog_xAuth_txtLabel", LocateBy.Id);
     ForgetPasswordUrl = new Input("ctl00_cphDialog_xAuth_txtForgetPasswordUrl", LocateBy.Id);
     TestSuccessMessage = new Label("ctl00_cphDialog_xAuth_lblSuccessMessage", LocateBy.Id);
     ValidateMemberRequirePassword = new CheckBox("ctl00_cphDialog_xAuth_chkPassword", LocateBy.Id);
     ValidateMemberByUserName = new RadioButton("ctl00_cphDialog_xAuth_rdoMembership", LocateBy.Id);
     ValidateMemberByEmail = new RadioButton("ctl00_cphDialog_xAuth_rdoEmail", LocateBy.Id);
     ErrorDIVLocator = new ElementBase("//div[@id='ctl00_cphDialog_xAuth_xAuthValSummary']", LocateBy.XPath);
 }
 public void SetPersonalInfoFieldRequired(FormData.PersonalInfoField field, bool checkRequiredOption)
 {
     switch (field)
     {
         case FormData.PersonalInfoField.SocialSecurityNumber:
             CheckBox SSNVisible = new CheckBox("ctl00_cph_chkCollectionFieldsrSSNID", LocateBy.Id);
             SSNVisible.Set(checkRequiredOption);
             break;
         case FormData.PersonalInfoField.ContactInfo:
             CheckBox ContactInfoVisible = new CheckBox(string.Format("//*[contains(text(),'{0}')]/../td[3]/input", StringEnum.GetStringValue(field)), LocateBy.XPath);
             ContactInfoVisible.Set(checkRequiredOption);
             break;
         default:
             CheckBox StandardFieldVisible = new CheckBox(string.Format("//*[text()='{0}']/../../../..//td[3]/input", CustomStringAttribute.GetCustomString(field)), LocateBy.XPath);
             StandardFieldVisible.Set(checkRequiredOption);
             break;
     }
 }
 public void SetLodgingStandardFieldVisible(FormData.LodgingStandardFields field, bool visible)
 {
     CheckBox LodgingStandardFieldVisible = new CheckBox(string.Format("ctl00_cph_chk{0}V", field.ToString()), LocateBy.Id);
     LodgingStandardFieldVisible.Set(visible);
 }
 public void SetLodgingStandardFieldRequired(FormData.LodgingStandardFields field, bool requied)
 {
     CheckBox LodgingStandardFieldRequired = new CheckBox(string.Format("ctl00_cph_chk{0}R", field.ToString()), LocateBy.Id);
     LodgingStandardFieldRequired.Set(requied);
 }