Java selenium通过JS直接进行赋值给日期框
html源码如下图所示:
Java代码:
JavascriptExecutor js=(JavascriptExecutor)driver;
js.executeScript("document.getElementById('beginDate').value='2020-05-10'");
html源码如下图所示:
Java代码:
JavascriptExecutor js=(JavascriptExecutor)driver;
js.executeScript("document.getElementById('beginDate').value='2020-05-10'");