I am in stuck using with calender automate I want to automate a calender using with selenium. I am following page object design pattern.
here is my code..
pageobject
@FindBy(how=How.ID,using="booked_for")
WebElement booked_for;
public void setCalender(String strdate){
// booked_for.clear();
booked_for.sendKeys(strdate);
}
pageobjectsteps
AppointmentPage appointmentPageobj= PageFactory.initElements(DriverManager.driver,AppointmentPage.class);
appointmentPageobj.setCalender(strdate);
test
AppointmentPage ex=log.Valid("986444545","antony","[email protected]","Demo","2017-03-04","Dr.John");
Error :
org.openqa.selenium.InvalidElementStateException: invalid element state: Element must be user-editable in order to clear it.
Inspect code :
<input type="text" id="booked_for" value="2017-03-02" name="booked_for" readonly="" class="form-control type-num date-inp">
Couldn't automate the calender and clear() is get error