Example #1
0
 public void RegisterUser(string login, string password)
 {
     _selenium.Open("/registration/");
     _selenium.Type("//input[@class='text']", login);
     _selenium.Type("//input[@class='text'][@type='password'][1]", password);
     _selenium.Type("document.forms[0].elements[10]", password);
     _selenium.Click("id=iagree");
     _selenium.ClickAndWait("//input[@alt='Зарегистрироваться']", WaitingType.PageLoad);
 }
 private void AddSearchCondition(string control, string value, int controlType)
 {
     if (value != "")
     {
         if (controlType == 1)
         {
             _selenium.Type(control, value);
         }
         else
         {
             _selenium.Select(control, "label=" + value);
         }
     }
 }
 public void ProceedStep1(string index)
 {
     _selenium.Open("/shoppingcart/");
     _selenium.ClickAndWait("//input[@alt='Оформить заказ'][1]", WaitingType.PageLoad);
     try
     {
         _selenium.Type("//input[@class='text'][@type='text']", index);
     }
     catch (SeleniumException)
     {
         //	NOTE: Сие сделано для workaround бага с необходимостью дважды жать кнопку Оформить заказ
         _selenium.ClickAndWait("//input[@alt='Оформить заказ'][1]", WaitingType.PageLoad);
     }
     _selenium.ClickAndWait("link=Продолжить оформление заказа", WaitingType.Ajax);
 }