import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.Select;
public class fbcalender {
static WebDriver driver;
public static void main(String[] args) throws Exception {
System.setProperty("webdriver.chrome.driver", "C:\\Users\\User\\Downloads\\chromedriver83\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
//Here you can give dates as parameters
setday(driver,"12","Aug","1999");
}
public static void setday(WebDriver driver,String day,String month,String year)
{
// Select date
Select dates=new Select(driver.findElement(By.id("day")));
dates.selectByValue(day);
//select month from drop down
Select Months=new Select(driver.findElement(By.id("month")));
Months.selectByVisibleText(month);
//select year
Select Years=new Select(driver.findElement(By.id("year")));
Years.selectByVisibleText(year);
}
}