public SUIHtmlInputButton SearchHtmlInputButtonByID(string id, int index) { List <SUIHtmlControlBase> list = GetElementsByTagName("INPUT"); int i = 0; Regex regex = new Regex("[0-9]+"); string ctrlID = null; foreach (SUIHtmlControlBase ctrl in list) { if (SUIHtmlInputButton.IsInputButtonElement(ctrl)) { if (ctrl.ID != null) { ctrlID = regex.Replace(ctrl.ID, "*"); } if ((ctrl.ID != null && ctrlID.Equals(id)) || (ctrl.ID == null && id == null)) { if (i == index) { SUIHtmlInputButton inputButton = new SUIHtmlInputButton(ctrl); return(inputButton); } i++; } } } return(null); }
public SUIHtmlInputButton SearchHtmlInputButtonByID(string id, int index) { List<SUIHtmlControlBase> list = GetElementsByTagName("INPUT"); int i = 0; Regex regex = new Regex("[0-9]+"); string ctrlID = null; foreach (SUIHtmlControlBase ctrl in list) { if (SUIHtmlInputButton.IsInputButtonElement(ctrl)) { if (ctrl.ID != null) ctrlID = regex.Replace(ctrl.ID, "*"); if ((ctrl.ID != null && ctrlID.Equals(id)) || (ctrl.ID == null && id == null)) { if (i == index) { SUIHtmlInputButton inputButton = new SUIHtmlInputButton(ctrl); return inputButton; } i++; } } } return null; }