Waits until element is present on the DOM of a page and visible. Visibility means that the element is not only
displayed but also has a height and width that is greater than 0.

@param elementLocator
identifier of element to be visible
189200
public static void waitUntilElementIsVisible(final String elementLocator) {
        logger.entering(elementLocator);
        By by = HtmlElementUtils.resolveByType(elementLocator);
        ExpectedCondition<WebElement> condition = ExpectedConditions.visibilityOfElementLocated(by);
        waitForCondition(condition);
        logger.exiting();
    }
1284603
public static void setVisible(HTMLElement element, boolean visible) {
        if (element != null) {
            element.style.display = visible ? "" : "none";
        }
    }
337020
public void viewShouldNotShowElement(String viewName, String elementName) throws IllegalAccessException,
			InterruptedException {
		boolean pass = false;

		long startOfLookup = System.currentTimeMillis();

		int timeoutInMillies = getSeleniumManager().getTimeout() * 1000;

		while (!pass) {

			WebElement found = getElementFromReferencedView(viewName, elementName);
			try {
				pass = !found.isDisplayed();
			} catch (NoSuchElementException e) {
				pass = true;
			}

			if (!pass) {
				Thread.sleep(100);
			}
			if (System.currentTimeMillis() - startOfLookup > timeoutInMillies) {
				String foundLocator = getElementLocatorFromReferencedView(viewName, elementName);
				fail("The element \"" + foundLocator + "\" referenced by \"" + elementName + "\" on view/page \"" + viewName + "\" is still found where it is not expected after " + getSeleniumManager().getTimeout() + " seconds.");
				break;
			}
		}
	}
797904
protected void setPreviewVisible(boolean visible) {

        if (visible) {
            addStyleName(I_CmsLayoutBundle.INSTANCE.locationPickerCss().hasPreview());
        } else {
            removeStyleName(I_CmsLayoutBundle.INSTANCE.locationPickerCss().hasPreview());
        }
    }
801370
function visible( element ) {
		// check if one of the parents (until it's position parent) is invisible
		// prevent that elements in static area are always checked as invisible

		// list all items until the offsetParent item (with jQuery >1.6 you can use parentsUntil)
		var oOffsetParent = jQuery(element).offsetParent();
		var bOffsetParentFound = false;
		var $refs = jQuery(element).parents().filter(function() {
			if (this === oOffsetParent) {
				bOffsetParentFound = true;
			}
			return bOffsetParentFound;
		});

		// check for at least one item to be visible
		return !jQuery(element).add($refs).filter(function() {
			return jQuery.css( this, "visibility" ) === "hidden" || jQuery.expr.filters.hidden( this );
		}).length;
	}
550723
public static ExpectedCondition<WebElement> presenceOfElementLocated(final By locator) {
    return new ExpectedCondition<WebElement>() {
      @Override
      public WebElement apply(WebDriver driver) {
        return driver.findElement(locator);
      }

      @Override
      public String toString() {
        return "presence of element located by: " + locator;
      }
    };
  }
918724
def element_should_be_visible(self, locator, loglevel='INFO'):
        
        if not self._element_find(locator, True, True).is_displayed():
            self.log_source(loglevel)
            raise AssertionError("Element '%s' should be visible "
                                 "but did not" % locator)
166421
private static boolean isAvailable(WebElement element) {
        return element.isDisplayed() || isElementHiddenUnderScroll(element)
                && !element.getCssValue("visibility").equals("hidden");
    }
284703
def assert_visible(self, locator, msg=None):
        
        e = driver.find_elements_by_locator(locator)
        if len(e) == 0:
            raise AssertionError("Element at %s was not found" % locator)
        assert e.is_displayed()
97686
private void setResourcesVisible(boolean visible) {

        m_noResources.setVisible(!visible);
        m_scrollPanel.setVisible(visible);
        m_topBar.getElement().getStyle().setVisibility(visible ? Visibility.VISIBLE : Visibility.HIDDEN);
        m_checkboxSiblings.setVisible(true);
        m_checkboxRelated.setVisible(true);
    }
1143231
private final static void traverse(Element element, ElementVisitor visitor) {

		visitor.visit(element);

		NodeList children = element.getChildNodes();

		for (int i = 0; i < children.getLength(); i++) {
			Node node = children.item(i);

			if (node.getNodeType() != Node.ELEMENT_NODE)
				continue;

			traverse((Element) node, visitor);
		}
	}
303164
function tabBrowser_waitForTabPanel(tabIndex, elemString) {
    // Get the specified tab panel element
    var tabPanel = this.getTabPanelElement(tabIndex, elemString);
    
    // Get the style information for the tab panel element
    var style = this._controller.window.getComputedStyle(tabPanel.getNode(), null);
    
    // Wait for the top margin to be 0px - ie. has stopped animating
    // XXX: A notification bar starts at a negative pixel margin and drops down
    //      to 0px.  This creates a race condition where a test may click
    //      before the notification bar appears at it's anticipated screen location
    this._controller.waitFor(function () {
      return style.marginTop == '0px';
    }, "Expected notification bar to be visible: '" + elemString + "' ");
  }
1148642
public boolean getElementExists(By locator) {
		waitForLoaders();
		List<WebElement> foundElements = getWebDriver().findElements(locator);
		return (foundElements.size() > 0);
	}
1023370
public static ExpectedCondition<List<WebElement>> visibilityOfFirstElements(final By locator) {
        return new ExpectedCondition<List<WebElement>>() {
            @Override
            public List<WebElement> apply(final WebDriver driver) {
                return getFirstVisibleWebElements(driver, null, locator);
            }

            @Override
            public String toString() {
                return String.format("visibility of element located by %s", locator);
            }
        };
    }
95965
public static ExpectedCondition<List<WebElement>> presenceOfAllElementsLocatedBy(
    final By locator) {
    return new ExpectedCondition<List<WebElement>>() {
      @Override
      public List<WebElement> apply(WebDriver driver) {
        List<WebElement> elements = driver.findElements(locator);
        return elements.size() > 0 ? elements : null;
      }

      @Override
      public String toString() {
        return "presence of any elements located by " + locator;
      }
    };
  }
294273
@Override
    public void visit(NodeVisitor v) {
        if (v.visit(this)) {
            target.visit(v);
            element.visit(v);
        }
    }
1356234
def asset_element_present(self, locator, msg=None):
        
        e = driver.find_elements_by_locator(locator)
        if len(e) == 0:
            raise AssertionError("Element at %s was not found" % locator)