private void LaunchDropDownButtonControl() { var control = new DropdownSelector(); var items = new List<LookupMessage>{new LookupMessage{DisplayOrder = 2, ID=Guid.NewGuid(), Name="NY"}, new LookupMessage{DisplayOrder = 1, ID=Guid.NewGuid(), Name="NJ"}, new LookupMessage{DisplayOrder = 0, ID=Guid.NewGuid(), Name="PA"}}; control.Items = items; LoadControlImpl(control); }
public string SelectDropDownElement(By by, DropdownSelector selector, string value) { Wait(500); var element = _driver.FindElement(by); Highlight(element); var selectElement = new SelectElement(element); switch (selector) { case DropdownSelector.Text: Wait(750); selectElement.SelectByText(value); return(value); case DropdownSelector.Value: Wait(750); selectElement.SelectByValue(value); return(value); default: return("Selector seçimi doğru yapılmadı"); } }