I’m not able to click element in a component. Even using JavaScriptExecutor, the click is still not possible.
public static void selecionarDataCalendario(By by,WebDriver driver,WebDriverWait wait, WebElement webElement) throws Throwable {
Calendar dat = Calendar.getInstance();
dat.setTime(new Date());
SimpleDateFormat formatterMes = new SimpleDateFormat("MM");
SimpleDateFormat formatterAno = new SimpleDateFormat("YYYY");
SimpleDateFormat formatterDia = new SimpleDateFormat("dd");
String mes = formatterMes.format(dat.getTime());
String ano = formatterAno.format(dat.getTime());
String dia = formatterDia.format(dat.getTime());
driver.findElement(by).click();
Thread.sleep(500);
driver.findElement(By.xpath("//td[text()='"+ dia +"']")).click();
Thread.sleep(500);
}