Why not create a dynamic date picker based on the date you want to select. I hope that's what you are referring to and looking at.
Xpath:
//*[@aria-label="Thu Sep 02 2021"]
Code:
public By getSelectedLabel(String date){
return By.xpath("//*[@aria-label="+date+"]");
}
OR
public static void main(String[] args) {
clickOnSelectedLabel(driver, "Thu Sep 02 2021");
}
public void clickOnSelectedLabel(WebDriver driver, String date){
driver.findElement(By.xpath("//*[@aria-label="+date+"]"));
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…