[英]Selecting date from datepicker
use this piece of code and let me know if there is any issue 使用这段代码,让我知道是否有任何问题
List<WebElement> alldates = driver.findElements(by.id('locator of the date picker which conatins all dates in it'));
for (WebElement dates : alldates) {
if (dates.isDisplayed() && dates.isEnabled()
&& dates.getText().equalsIgnoreCase("Date To be Clicked")) {
dates.click();
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.