public void SetInput(IBrowserDriver browserDriver) { foreach (var selectText in _text) { browserDriver.SetValue(_baseName, selectText); } // browserDriver.SetValue(_baseName+"_date",input.ToShortDateString()); - sets text field with string value }
public void SetInput(IBrowserDriver browserDriver) { var input = DateTime.Parse(_text); browserDriver.SetValue(_baseName+"_date",input.ToShortDateString()); if (input.Hour == 0) browserDriver.SetValue(_baseName + "_hour", "12"); else if (input.Hour > 12) browserDriver.SetValue(_baseName + "_hour", (input.Hour-12).ToString()); else browserDriver.SetValue(_baseName + "_hour", input.Hour.ToString()); browserDriver.SetValue(_baseName + "_minute", input.Minute.ToString()); browserDriver.SetValue(_baseName + "_noon", input.Hour>=12?"P.M.":"A.M."); browserDriver.ExecuteScript("$('#" + _baseName + "_noon"+ "').blur();"); }
public void SetInput(IBrowserDriver browserDriver) { var input = DateTime.Parse(_text); browserDriver.SetValue(_baseName + "_date", input.ToShortDateString()); if (input.Hour == 0) { browserDriver.SetValue(_baseName + "_hour", "12"); } else if (input.Hour > 12) { browserDriver.SetValue(_baseName + "_hour", (input.Hour - 12).ToString()); } else { browserDriver.SetValue(_baseName + "_hour", input.Hour.ToString()); } browserDriver.SetValue(_baseName + "_minute", input.Minute.ToString()); browserDriver.SetValue(_baseName + "_noon", input.Hour >= 12?"P.M.":"A.M."); browserDriver.ExecuteScript("$('#" + _baseName + "_noon" + "').blur();"); }
public override void SetInput(IBrowserDriver browserDriver) { browserDriver.SetValue(_inputName, _value); }