I'm using the Fullcalendar Resource-timeline feature.
I want to create automatic tests that click on dates in order to create events. The problem here, is that the cells are not dom elements. The solution I came up so far is to calculate the coordinates for the cursor to click, but it's not working.
WebDriver driver = getDriver();
Actions actions = new Actions(driver);
// Get absence calendar
WebElement absenceCalendar = getAbsenceCalendar(driver);
// Get X coordinate for the first monday of the month. Add 5px in order to close in to the center
int xCoordinates = getFirstDayFromAnyCalendar(absenceCalendar,"L").getLocation().getX()+5;
logger.info("X: "+xCoordinates);
// Get Y coordinate from jeune
int yCoordinates = getJeuneLineFromCalendar(absenceCalendar,jeune).getLocation().getY();
logger.info("Y: "+yCoordinates);
//Move the cursor to the top left corner of the screen
actions.moveToElement(driver.findElement(By.tagName("body")), 0, 0);
//Move the cursor to the coordinates and click.
actions.moveByOffset(xCoordinates, yCoordinates).click().perform();
The coordinates checks out, but the click does not work. Any idea ?