示例#1
0
        public static IControl GetPDEP_MismatchedFlatQuestionRadioButton(String questionPrompt, String radioButton)
        {
            IControl flatQuestionHost          = GetFlatQuestionHost(questionPrompt);
            ReadOnlyCollection <IControl> rows = SyncUtilities.FindVisibleElements_Parent(flatQuestionHost.WebElement, By.TagName("tr"));

            foreach (IControl row in rows)
            {
                ReadOnlyCollection <IControl> cells = SyncUtilities.FindVisibleElements_Parent(row.WebElement, By.TagName("td"));
                if (cells.Count == 2)
                {
                    String text = WebTableUtilities.GetText(cells[1]);
                    if (text.Equals(": " + radioButton))
                    {
                        return(WebTableUtilities.GetInputControl_RadioButton(cells[0]));
                    }
                }
            }
            return(null);
        }