Пример #1
0
 public void SetText(Browser browser, string id, string textToSet)
 {
     var dropDown = browser.DropDownListWithId(id);
     var option = dropDown.OptionWithText(textToSet);
     if (option.Exists().IsTrue)
     {
         option.Select();
         return;
     }
     option = dropDown.OptionWithValue(textToSet);
     if (option.Exists().IsTrue)
     {
         option.Select();
         return;
     }
     throw new AssertionException(String.Format("The drop down with id '{0}' does not have option '{1}'", id, textToSet));
 }
Пример #2
0
 public bool IsMatch(Browser browser, string id)
 {
     return browser.DropDownListWithId(id).Exists().IsTrue;
 }