时间控件输入

时间控件输入_第1张图片


selenium.FindElementById("d1").Clear();

selenium.FindElementById("d1").Click();

selenium.SwitchTo().Frame(0);

selenium.FindElementById("dpClearInput").Click();// 清除以前的值

selenium.SwitchTo().DefaultContent();

IJavaScriptExecutor removeAttribute = (IJavaScriptExecutor)selenium;

removeAttribute.ExecuteScript("var setDate=document.getElementById(\"d1\");setDate.removeAttribute('readonly');");

selenium.FindElementById("d1").SendKeys(stime);

你可能感兴趣的:(时间控件输入)