@Test(dependsOnMethods = "testIsEventPresent", timeOut = 60000) public void testChooseDayTab() { calendarPage = calendarPage.chooseDayTab().render(); assertNotNull(calendarPage, "Calendar page day tab isn't opened"); Assert.assertTrue(calendarPage.isEventPresent(CalendarPage.EventType.DAY_TAB_SINGLE_EVENT, event1), "The " + event1 + " isn't correctly displayed on the day tab"); }
public HtmlPage chooseDayTab() { try { logger.info("Choose day tab"); drone.findAndWait(DAY_BUTTON).click(); } catch (NoSuchElementException e) { logger.debug("Unable to locate Day button"); } catch (TimeoutException te) { logger.debug("The operation has timed out"); } drone.waitForPageLoad(SECONDS.convert(maxPageLoadingTime, MILLISECONDS)); synchronized (this) { try { this.wait(waitInMilliSeconds); } catch (InterruptedException e) { } } return FactorySharePage.resolvePage(drone); }
CalendarPage extends SitePage { public HtmlPage chooseDayTab() { try { logger.info("Choose day tab"); drone.findAndWait(DAY_BUTTON).click(); } catch (NoSuchElementException e) { logger.debug("Unable to locate Day button"); } catch (TimeoutException te) { logger.debug("The operation has timed out"); } drone.waitForPageLoad(SECONDS.convert(maxPageLoadingTime, MILLISECONDS)); synchronized (this) { try { this.wait(waitInMilliSeconds); } catch (InterruptedException e) { } } return FactorySharePage.resolvePage(drone); } }
CalendarPage extends SitePage { public HtmlPage chooseDayTab() { try { logger.info("Choose day tab"); drone.findAndWait(DAY_BUTTON).click(); } catch (NoSuchElementException e) { logger.debug("Unable to locate Day button"); } catch (TimeoutException te) { logger.debug("The operation has timed out"); } drone.waitForPageLoad(SECONDS.convert(maxPageLoadingTime, MILLISECONDS)); synchronized (this) { try { this.wait(waitInMilliSeconds); } catch (InterruptedException e) { } } return FactorySharePage.resolvePage(drone); } CalendarPage(WebDrone drone); }
CalendarPage extends SitePage { public HtmlPage chooseDayTab() { try { logger.info("Choose day tab"); drone.findAndWait(DAY_BUTTON).click(); } catch (NoSuchElementException e) { logger.debug("Unable to locate Day button"); } catch (TimeoutException te) { logger.debug("The operation has timed out"); } drone.waitForPageLoad(SECONDS.convert(maxPageLoadingTime, MILLISECONDS)); synchronized (this) { try { this.wait(waitInMilliSeconds); } catch (InterruptedException e) { } } return FactorySharePage.resolvePage(drone); } CalendarPage(WebDrone drone); @SuppressWarnings("unchecked") @Override CalendarPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override CalendarPage render(); @SuppressWarnings("unchecked") @Override CalendarPage render(long time); AddEventForm clickOnAddEvent(); AddEventForm clickOnTabOrButtonAddEvent(ActionEventVia createEventVia); CalendarPage createEvent(String whatField, String whereField, String description, boolean allDay); CalendarPage createEvent(ActionEventVia createEventVia, String whatField, String whereField, String description, String startDate, String startTime, String endDate, String endTime, String tags, boolean allDay); CalendarPage createEvent(ActionEventVia createEventVia, String whatField, String whereField, String description, String startYear, String startMonth, String startDate, String startTime, String endYear, String endMonth, String endDate, String endTime, String tags, boolean allDay); boolean isAddEventPresent(); CalendarPage editEvent(String eventName, EventType eventType, ActionEventVia editEventVia, String whatField, String whereField, String description, String startDate, String startTime, String endDate, String endTime, String tags, boolean allDay, String[] removeTag); CalendarPage deleteEvent(String eventName, EventType eventType, ActionEventVia editEventVia); HtmlPage chooseDayTab(); HtmlPage chooseWeekTab(); HtmlPage chooseMonthTab(); HtmlPage chooseAgendaTab(); boolean isDayTabOpened(); boolean isWeekTabOpened(); boolean isMonthTabOpened(); boolean isAgendaTabOpened(); boolean isEventPresent(EventType eventType, String eventName); CalendarPage showAllHours(); boolean showAllHoursButtonDisplayed(); CalendarPage showWorkingHours(); boolean showWorkingHoursButtonDisplayed(); boolean checkTableHours(HoursFromTable xpath); InformationEventForm clickOnEvent(EventType eventType, String eventName); String clickIcalFeedButton(); String getIcalFeedHref(); boolean isShowAllItemsPresent(); CalendarPage clickShowAllItems(); boolean isTagPresent(String tagName); CalendarPage clickTagLink(String tagName); boolean isAddEventClickable(ActionEventVia viaTab); int getTheNumOfEvents(ActionEventVia viaTab); }
CalendarPage extends SitePage { public HtmlPage chooseDayTab() { try { logger.info("Choose day tab"); drone.findAndWait(DAY_BUTTON).click(); } catch (NoSuchElementException e) { logger.debug("Unable to locate Day button"); } catch (TimeoutException te) { logger.debug("The operation has timed out"); } drone.waitForPageLoad(SECONDS.convert(maxPageLoadingTime, MILLISECONDS)); synchronized (this) { try { this.wait(waitInMilliSeconds); } catch (InterruptedException e) { } } return FactorySharePage.resolvePage(drone); } CalendarPage(WebDrone drone); @SuppressWarnings("unchecked") @Override CalendarPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override CalendarPage render(); @SuppressWarnings("unchecked") @Override CalendarPage render(long time); AddEventForm clickOnAddEvent(); AddEventForm clickOnTabOrButtonAddEvent(ActionEventVia createEventVia); CalendarPage createEvent(String whatField, String whereField, String description, boolean allDay); CalendarPage createEvent(ActionEventVia createEventVia, String whatField, String whereField, String description, String startDate, String startTime, String endDate, String endTime, String tags, boolean allDay); CalendarPage createEvent(ActionEventVia createEventVia, String whatField, String whereField, String description, String startYear, String startMonth, String startDate, String startTime, String endYear, String endMonth, String endDate, String endTime, String tags, boolean allDay); boolean isAddEventPresent(); CalendarPage editEvent(String eventName, EventType eventType, ActionEventVia editEventVia, String whatField, String whereField, String description, String startDate, String startTime, String endDate, String endTime, String tags, boolean allDay, String[] removeTag); CalendarPage deleteEvent(String eventName, EventType eventType, ActionEventVia editEventVia); HtmlPage chooseDayTab(); HtmlPage chooseWeekTab(); HtmlPage chooseMonthTab(); HtmlPage chooseAgendaTab(); boolean isDayTabOpened(); boolean isWeekTabOpened(); boolean isMonthTabOpened(); boolean isAgendaTabOpened(); boolean isEventPresent(EventType eventType, String eventName); CalendarPage showAllHours(); boolean showAllHoursButtonDisplayed(); CalendarPage showWorkingHours(); boolean showWorkingHoursButtonDisplayed(); boolean checkTableHours(HoursFromTable xpath); InformationEventForm clickOnEvent(EventType eventType, String eventName); String clickIcalFeedButton(); String getIcalFeedHref(); boolean isShowAllItemsPresent(); CalendarPage clickShowAllItems(); boolean isTagPresent(String tagName); CalendarPage clickTagLink(String tagName); boolean isAddEventClickable(ActionEventVia viaTab); int getTheNumOfEvents(ActionEventVia viaTab);  }