List of usage examples for org.openqa.selenium WebElement isDisplayed
boolean isDisplayed();
From source file:org.alfresco.po.share.search.FacetedSearchBulkActions.java
License:Open Source License
/** * Checks if Options menu item is displayed. * //from w w w . j av a 2s .c om * @return true if visible */ public boolean isSelectedItemsOptionDisplayed(SearchSelectedItemsMenu option) { try { clickSelectedItems(); if (isSelectedItemsMenuEnabled()) { WebElement bulkSelect = driver.findElement(By.cssSelector(option.getOption())); return bulkSelect.isDisplayed(); } } catch (NoSuchElementException nse) { if (logger.isTraceEnabled()) { logger.trace("Option is not present. ", nse); } } return false; }
From source file:org.alfresco.po.share.search.FacetedSearchConfigFilter.java
License:Open Source License
/** * Gets the clickDelete_Filter.//ww w .ja v a2s . co m */ public void deleteFilter(boolean selectYes) { try { WebElement filterdelete = this.filterdelete.findElement(CLICK_DELETE_IMAGE); if (filterdelete.isDisplayed()) { filterdelete.click(); List<WebElement> buttonNames = driver.findElements(CONFIRM_DELETE); String buttonName = "Yes"; if (!selectYes) { buttonName = "No"; } // Iterate list of buttons for (WebElement button : buttonNames) { if (button.getText().equalsIgnoreCase(buttonName) && (button.isDisplayed())) { button.click(); waitUntilVisible(By.cssSelector("div.bd"), "Successfully deleted", 10); waitUntilNotVisibleWithParitalText(By.cssSelector("div.bd"), "Successfully deleted", 10); break; } } } } catch (NoSuchElementException e) { if (logger.isTraceEnabled()) { logger.trace("Unable to select the button"); } } }
From source file:org.alfresco.po.share.search.FacetedSearchPage.java
License:Open Source License
/** * Click on configure search Link. *// w ww . ja v a 2 s . c om * * @return the FacetedSearchConfigpage */ public FacetedSearchConfigPage clickConfigureSearchLink() { try { WebElement configure_search = driver.findElement(CONFIGURE_SEARCH); if (configure_search.isDisplayed()) { configure_search.click(); } return getCurrentPage().render(); } catch (TimeoutException e) { logger.error("Unable to find the link : " + e.getMessage()); } throw new PageException("Unable to find the link : "); }
From source file:org.alfresco.po.share.search.FacetedSearchPage.java
License:Open Source License
/** * verify configureSearchlink is displayed * /*from w w w .ja v a 2 s . c o m*/ * @param driver WebDrone * @return Boolean */ public Boolean isConfigureSearchDisplayed(WebDriver driver) { try { WebElement configure_search = driver.findElement(CONFIGURE_SEARCH); if (configure_search.isDisplayed()) { return true; } } catch (NoSuchElementException te) { if (logger.isTraceEnabled()) { logger.trace("Unable to find configure search link"); } } return false; }
From source file:org.alfresco.po.share.search.LiveSearchDropdown.java
License:Open Source License
/** * Checks if live search dropdown is displayed * * @return boolean/* ww w. j av a2 s . c o m*/ */ public boolean isLiveSearchDropdownVisible() { try { WebElement liveSearchDropDown = driver.findElement(By.cssSelector(LIVE_SEARCH_DROPDOWN)); boolean displayed = liveSearchDropDown.isDisplayed(); if (logger.isTraceEnabled()) { logger.trace(String.format("** Live Search dropdown: %s", displayed)); } return displayed; } catch (NoSuchElementException nse) { logger.error("No live search dropdown ", nse); } return false; }
From source file:org.alfresco.po.share.search.LiveSearchDropdown.java
License:Open Source License
/** * Checks if documents title is displayed * /*from w ww .j av a 2 s . co m*/ * @return boolean */ public boolean isDocumentsTitleVisible() { try { WebElement title = driver.findElement(By.cssSelector(DOCUMENTS_TITLE)); return title.isDisplayed(); } catch (NoSuchElementException nse) { logger.error("No live search documents title ", nse); return false; } }
From source file:org.alfresco.po.share.search.LiveSearchDropdown.java
License:Open Source License
/** * Checks if sites title is displayed// w ww .ja v a 2s. co m * * @return boolean */ public boolean isSitesTitleVisible() { try { WebElement title = driver.findElement(By.cssSelector(SITES_TITLE)); return title.isDisplayed(); } catch (NoSuchElementException nse) { logger.error("No live search sites title ", nse); } return false; }
From source file:org.alfresco.po.share.search.LiveSearchDropdown.java
License:Open Source License
/** * Checks if people title is displayed// ww w . java 2 s . c o m * * @return boolean */ public boolean isPeopleTitleVisible() { try { WebElement title = driver.findElement(By.cssSelector(PEOPLE_TITLE)); return title.isDisplayed(); } catch (NoSuchElementException nse) { logger.error("No live search people title ", nse); return false; } }
From source file:org.alfresco.po.share.search.LiveSearchDropdown.java
License:Open Source License
/** * Checks if more icon is displayed/*from w ww. j a va 2 s . c o m*/ * * @return boolean */ public boolean isMoreResultsVisible() { try { WebElement more = driver.findElement(By.cssSelector(MORE_RESULTS)); return more.isDisplayed(); } catch (NoSuchElementException nse) { logger.error("No more results icon ", nse); return false; } }
From source file:org.alfresco.po.share.search.LiveSearchDropdown.java
License:Open Source License
/** * Checks if scope Repository is displayed * * @return boolean//from ww w .j ava 2 s .c o m */ public boolean isScopeRepositoryVisible() { try { WebElement scopeRepo = driver.findElement(By.cssSelector(SCOPE_REPOSITORY)); return scopeRepo.isDisplayed(); } catch (NoSuchElementException nse) { logger.error("No live search scope repository option ", nse); return false; } }