@Test(dependsOnMethods="getAvailableResultSizes") public void search() { String searchText = "xyz123"; searchDashlet.search(searchText).render(); Assert.assertEquals(searchDashlet.getContent(), "No results found."); Assert.assertEquals(searchDashlet.getSearchText(), searchText); }
public SiteSearchDashlet search(String text) { try { WebElement inputElement = drone.findAndWait(INPUT_BOX); inputElement.clear(); inputElement.sendKeys(text); drone.findAndWait(SEARCH_BUTTON).click(); drone.waitUntilElementDisappears(LOADING_MESSAGE, TimeUnit.SECONDS.convert(WAIT_TIME_3000, TimeUnit.MILLISECONDS)); } catch (TimeoutException e) { logger.error("Not able to search ", e); } return this; }
SiteSearchDashlet extends AbstractDashlet implements Dashlet { public SiteSearchDashlet search(String text) { try { WebElement inputElement = drone.findAndWait(INPUT_BOX); inputElement.clear(); inputElement.sendKeys(text); drone.findAndWait(SEARCH_BUTTON).click(); drone.waitUntilElementDisappears(LOADING_MESSAGE, TimeUnit.SECONDS.convert(WAIT_TIME_3000, TimeUnit.MILLISECONDS)); } catch (TimeoutException e) { logger.error("Not able to search ", e); } return this; } }
SiteSearchDashlet extends AbstractDashlet implements Dashlet { public SiteSearchDashlet search(String text) { try { WebElement inputElement = drone.findAndWait(INPUT_BOX); inputElement.clear(); inputElement.sendKeys(text); drone.findAndWait(SEARCH_BUTTON).click(); drone.waitUntilElementDisappears(LOADING_MESSAGE, TimeUnit.SECONDS.convert(WAIT_TIME_3000, TimeUnit.MILLISECONDS)); } catch (TimeoutException e) { logger.error("Not able to search ", e); } return this; } protected  SiteSearchDashlet(WebDrone drone); }
SiteSearchDashlet extends AbstractDashlet implements Dashlet { public SiteSearchDashlet search(String text) { try { WebElement inputElement = drone.findAndWait(INPUT_BOX); inputElement.clear(); inputElement.sendKeys(text); drone.findAndWait(SEARCH_BUTTON).click(); drone.waitUntilElementDisappears(LOADING_MESSAGE, TimeUnit.SECONDS.convert(WAIT_TIME_3000, TimeUnit.MILLISECONDS)); } catch (TimeoutException e) { logger.error("Not able to search ", e); } return this; } protected  SiteSearchDashlet(WebDrone drone); @SuppressWarnings("unchecked") @Override synchronized SiteSearchDashlet render(RenderTime timer); @SuppressWarnings("unchecked") @Override SiteSearchDashlet render(long time); @SuppressWarnings("unchecked") @Override SiteSearchDashlet render(); boolean isHelpIconDisplayed(); void clickOnHelpIcon(); boolean isBalloonDisplayed(); String getHelpBalloonMessage(); SiteSearchDashlet closeHelpBallon(); String getTitle(); String getContent(); List<SiteSearchItem> getSearchItems(); SiteSearchDashlet search(String text); boolean siteSearchWithRetry(String fileName); List<String> getAvailableResultSizes(); String getSearchText(); void setResultSize(SearchLimit searchLimit); SiteSearchDashlet search(String searchString, SearchLimit searchLimit); SearchLimit getSelectedSearchLimit(); }
SiteSearchDashlet extends AbstractDashlet implements Dashlet { public SiteSearchDashlet search(String text) { try { WebElement inputElement = drone.findAndWait(INPUT_BOX); inputElement.clear(); inputElement.sendKeys(text); drone.findAndWait(SEARCH_BUTTON).click(); drone.waitUntilElementDisappears(LOADING_MESSAGE, TimeUnit.SECONDS.convert(WAIT_TIME_3000, TimeUnit.MILLISECONDS)); } catch (TimeoutException e) { logger.error("Not able to search ", e); } return this; } protected  SiteSearchDashlet(WebDrone drone); @SuppressWarnings("unchecked") @Override synchronized SiteSearchDashlet render(RenderTime timer); @SuppressWarnings("unchecked") @Override SiteSearchDashlet render(long time); @SuppressWarnings("unchecked") @Override SiteSearchDashlet render(); boolean isHelpIconDisplayed(); void clickOnHelpIcon(); boolean isBalloonDisplayed(); String getHelpBalloonMessage(); SiteSearchDashlet closeHelpBallon(); String getTitle(); String getContent(); List<SiteSearchItem> getSearchItems(); SiteSearchDashlet search(String text); boolean siteSearchWithRetry(String fileName); List<String> getAvailableResultSizes(); String getSearchText(); void setResultSize(SearchLimit searchLimit); SiteSearchDashlet search(String searchString, SearchLimit searchLimit); SearchLimit getSelectedSearchLimit(); static Integer retrySearchCount; }