public static void SelectListItemByText(string option) { var list = new HtmlList(browserWindow); try { list.SearchProperties.Add(CSVReader.ControlType + ".PropertyNames." + CSVReader.LocatorType, CSVReader.LocatorValue, HtmlList.PropertyNames.Name, "ctl00$contplhDynamic$ddlStatus"); list.WaitForControlEnabled(); list.WaitForControlReady(); } catch (Exception) { Assert.Fail("Failed to find " + CSVReader.ControlType + " Element - Element not Found"); } list.DrawHighlight(); var listItem = new HtmlListItem(list); listItem.SearchConfigurations.Add(SearchConfiguration.AlwaysSearch); listItem.SearchProperties.Add(HtmlListItem.PropertyNames.InnerText, option, PropertyExpressionOperator.Contains); listItem.DrawHighlight(); }