@Test(dependsOnMethods = "clickOnCloseButton") public void clickOnOKButton() { savedSearchDashlet = siteDashBoard.getDashlet(SAVED_SEARCH).render(); configureSavedSearchDialogBoxPage = savedSearchDashlet.clickOnEditButton().render(); configureSavedSearchDialogBoxPage.setSearchTerm(fileName); configureSavedSearchDialogBoxPage.setTitle(savedSearchTitle); configureSavedSearchDialogBoxPage.setSearchLimit(SearchLimit.FIFTY); siteDashBoard = configureSavedSearchDialogBoxPage.clickOnOKButton().render(); Assert.assertFalse(siteDashBoard.isConfigureSavedSearchDialogDisplayed()); }
public HtmlPage clickOnOKButton() { try { drone.find(OK_BUTTON).submit(); if (isConfigureSavedSearchDialogDisplayed()) { return this; } else if (drone.getCurrentPage().render() instanceof SiteDashboardPage) { return new SiteDashboardPage(drone); } else if (drone.getCurrentPage().render() instanceof DashBoardPage) { return new DashBoardPage(drone); } else { throw new PageOperationException("Current page is not ConfigureSavedSearchDialog or SiteDashBoardPage or DashBoardPage"); } } catch (NoSuchElementException te) { logger.error("Unable to find the OK button.", te); throw new PageOperationException("Unable to click the OK Button."); } }
ConfigureSavedSearchDialogBoxPage extends SharePage { public HtmlPage clickOnOKButton() { try { drone.find(OK_BUTTON).submit(); if (isConfigureSavedSearchDialogDisplayed()) { return this; } else if (drone.getCurrentPage().render() instanceof SiteDashboardPage) { return new SiteDashboardPage(drone); } else if (drone.getCurrentPage().render() instanceof DashBoardPage) { return new DashBoardPage(drone); } else { throw new PageOperationException("Current page is not ConfigureSavedSearchDialog or SiteDashBoardPage or DashBoardPage"); } } catch (NoSuchElementException te) { logger.error("Unable to find the OK button.", te); throw new PageOperationException("Unable to click the OK Button."); } } }
ConfigureSavedSearchDialogBoxPage extends SharePage { public HtmlPage clickOnOKButton() { try { drone.find(OK_BUTTON).submit(); if (isConfigureSavedSearchDialogDisplayed()) { return this; } else if (drone.getCurrentPage().render() instanceof SiteDashboardPage) { return new SiteDashboardPage(drone); } else if (drone.getCurrentPage().render() instanceof DashBoardPage) { return new DashBoardPage(drone); } else { throw new PageOperationException("Current page is not ConfigureSavedSearchDialog or SiteDashBoardPage or DashBoardPage"); } } catch (NoSuchElementException te) { logger.error("Unable to find the OK button.", te); throw new PageOperationException("Unable to click the OK Button."); } } protected  ConfigureSavedSearchDialogBoxPage(WebDrone drone); }
ConfigureSavedSearchDialogBoxPage extends SharePage { public HtmlPage clickOnOKButton() { try { drone.find(OK_BUTTON).submit(); if (isConfigureSavedSearchDialogDisplayed()) { return this; } else if (drone.getCurrentPage().render() instanceof SiteDashboardPage) { return new SiteDashboardPage(drone); } else if (drone.getCurrentPage().render() instanceof DashBoardPage) { return new DashBoardPage(drone); } else { throw new PageOperationException("Current page is not ConfigureSavedSearchDialog or SiteDashBoardPage or DashBoardPage"); } } catch (NoSuchElementException te) { logger.error("Unable to find the OK button.", te); throw new PageOperationException("Unable to click the OK Button."); } } protected  ConfigureSavedSearchDialogBoxPage(WebDrone drone); @SuppressWarnings("unchecked") @Override synchronized ConfigureSavedSearchDialogBoxPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override ConfigureSavedSearchDialogBoxPage render(long time); @SuppressWarnings("unchecked") @Override ConfigureSavedSearchDialogBoxPage render(); HtmlPage clickOnOKButton(); HtmlPage clickOnCancelButton(); HtmlPage clickOnCloseButton(); void setSearchTerm(String searchTerm); void setTitle(String title); void setSearchLimit(SearchLimit searchLimit); List<Integer> getAvailableListOfSearchLimitValues(); boolean isHelpBalloonDisplayed(); String getHelpBalloonMessage(); }
ConfigureSavedSearchDialogBoxPage extends SharePage { public HtmlPage clickOnOKButton() { try { drone.find(OK_BUTTON).submit(); if (isConfigureSavedSearchDialogDisplayed()) { return this; } else if (drone.getCurrentPage().render() instanceof SiteDashboardPage) { return new SiteDashboardPage(drone); } else if (drone.getCurrentPage().render() instanceof DashBoardPage) { return new DashBoardPage(drone); } else { throw new PageOperationException("Current page is not ConfigureSavedSearchDialog or SiteDashBoardPage or DashBoardPage"); } } catch (NoSuchElementException te) { logger.error("Unable to find the OK button.", te); throw new PageOperationException("Unable to click the OK Button."); } } protected  ConfigureSavedSearchDialogBoxPage(WebDrone drone); @SuppressWarnings("unchecked") @Override synchronized ConfigureSavedSearchDialogBoxPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override ConfigureSavedSearchDialogBoxPage render(long time); @SuppressWarnings("unchecked") @Override ConfigureSavedSearchDialogBoxPage render(); HtmlPage clickOnOKButton(); HtmlPage clickOnCancelButton(); HtmlPage clickOnCloseButton(); void setSearchTerm(String searchTerm); void setTitle(String title); void setSearchLimit(SearchLimit searchLimit); List<Integer> getAvailableListOfSearchLimitValues(); boolean isHelpBalloonDisplayed(); String getHelpBalloonMessage();  }