@Test(priority=3, expectedExceptions={IllegalArgumentException.class}) public void test102SearchForSitesWithNull() { siteFinder.searchForSite(null); }
public SiteFinderPage searchForSite(final String title) { if(title == null) { throw new IllegalArgumentException("Title can't be null."); } WebElement input = drone.findAndWait(By.cssSelector("input[id$='site-finder_x0023_default-term']")); input.clear(); input.sendKeys(title); WebElement searchSiteButton = drone.findAndWait(SEARCH_SUBMIT); searchSiteButton.click(); searchActioned(); return new SiteFinderPage(drone); }
SiteFinderPage extends SharePage { public SiteFinderPage searchForSite(final String title) { if(title == null) { throw new IllegalArgumentException("Title can't be null."); } WebElement input = drone.findAndWait(By.cssSelector("input[id$='site-finder_x0023_default-term']")); input.clear(); input.sendKeys(title); WebElement searchSiteButton = drone.findAndWait(SEARCH_SUBMIT); searchSiteButton.click(); searchActioned(); return new SiteFinderPage(drone); } }
SiteFinderPage extends SharePage { public SiteFinderPage searchForSite(final String title) { if(title == null) { throw new IllegalArgumentException("Title can't be null."); } WebElement input = drone.findAndWait(By.cssSelector("input[id$='site-finder_x0023_default-term']")); input.clear(); input.sendKeys(title); WebElement searchSiteButton = drone.findAndWait(SEARCH_SUBMIT); searchSiteButton.click(); searchActioned(); return new SiteFinderPage(drone); } SiteFinderPage(WebDrone drone); }
SiteFinderPage extends SharePage { public SiteFinderPage searchForSite(final String title) { if(title == null) { throw new IllegalArgumentException("Title can't be null."); } WebElement input = drone.findAndWait(By.cssSelector("input[id$='site-finder_x0023_default-term']")); input.clear(); input.sendKeys(title); WebElement searchSiteButton = drone.findAndWait(SEARCH_SUBMIT); searchSiteButton.click(); searchActioned(); return new SiteFinderPage(drone); } SiteFinderPage(WebDrone drone); @SuppressWarnings("unchecked") @Override synchronized SiteFinderPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override SiteFinderPage render(); @SuppressWarnings("unchecked") @Override SiteFinderPage render(final long time); SiteFinderPage searchForSite(final String title); boolean hasResults(); List<String> getSiteList(); HtmlPage deleteSite(final String siteName); SiteFinderPage joinSite(final String siteName); SiteFinderPage requestToJoinSite(final String siteName); SiteFinderPage leaveSite(final String siteName); SiteDashboardPage selectSite(final String siteName); boolean isButtonForSitePresent(String siteName, ButtonType button); HtmlPage clickDelete(String siteName); }
SiteFinderPage extends SharePage { public SiteFinderPage searchForSite(final String title) { if(title == null) { throw new IllegalArgumentException("Title can't be null."); } WebElement input = drone.findAndWait(By.cssSelector("input[id$='site-finder_x0023_default-term']")); input.clear(); input.sendKeys(title); WebElement searchSiteButton = drone.findAndWait(SEARCH_SUBMIT); searchSiteButton.click(); searchActioned(); return new SiteFinderPage(drone); } SiteFinderPage(WebDrone drone); @SuppressWarnings("unchecked") @Override synchronized SiteFinderPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override SiteFinderPage render(); @SuppressWarnings("unchecked") @Override SiteFinderPage render(final long time); SiteFinderPage searchForSite(final String title); boolean hasResults(); List<String> getSiteList(); HtmlPage deleteSite(final String siteName); SiteFinderPage joinSite(final String siteName); SiteFinderPage requestToJoinSite(final String siteName); SiteFinderPage leaveSite(final String siteName); SiteDashboardPage selectSite(final String siteName); boolean isButtonForSitePresent(String siteName, ButtonType button); HtmlPage clickDelete(String siteName);  }