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();");
        }
示例#3
0
 public override void SetInput(IBrowserDriver browserDriver)
 {
     browserDriver.ExecuteScript(("tinyMCE.execInstanceCommand('" + _inputName + "', 'mceSetContent', false, '" +
                                  _value + "')"));
 }