Hovers over the element, but only if the element is present and
displayed. If those conditions are not met, the hover action will be
logged, but skipped and the test will continue.
328493
public void hover() {
        String cantHover = "Unable to hover over ";
        String action = "Hovering over " + prettyOutput();
        String expected = prettyOutputStart() + " is present, and displayed to be hovered over";
        try {
            // wait for element to be present
            if (isNotPresent(action, expected, cantHover)) {
                return;
            }
            // wait for element to be displayed
            if (isNotDisplayed(action, expected, cantHover)) {
                return;
            }
            Actions selAction = new Actions(driver);
            WebElement webElement = getWebElement();
            selAction.moveToElement(webElement).perform();
        } catch (Exception e) {
            log.warn(e);
            reporter.fail(action, expected, cantHover + prettyOutputEnd() + e.getMessage());
            return;
        }
        reporter.pass(action, expected, "Hovered over " + prettyOutputEnd().trim());
    }
1214288
function hover(event) {
    var payload = context.payload;

    payload.hoverGfx = event.gfx;
    payload.hover = event.element;

    fire('hover');
  }
861798
def check_by_selector(self, selector):
    """"""
    elem = find_element_by_jquery(world.browser, selector)
    if not elem.is_selected():
        elem.click()
86913
function(lineIndex, e) {
			if (!this._currentClickGroup) {
				this._setCurrentGroup(-1);
			}

			if (this._hoverTimeout) {
				window.clearTimeout(this._hoverTimeout);
				this._hoverTimeout = null;
			}
		}
550890
public static void ensureMouseOver(Element element) {

        NativeEvent nativeEvent = Document.get().createMouseOverEvent(
            0,
            0,
            0,
            0,
            0,
            false,
            false,
            false,
            false,
            0,
            null);
        element.dispatchEvent(nativeEvent);
    }
308742
public static void ensureMouseOut(Element element) {

        NativeEvent nativeEvent = Document.get().createMouseOutEvent(
            0,
            0,
            0,
            0,
            0,
            false,
            false,
            false,
            false,
            0,
            null);
        element.dispatchEvent(nativeEvent);
    }
110379
@Override
	public boolean isElementPresent(long timeout) throws WidgetException {
		final long start = System.currentTimeMillis();
		final long end = start + timeout;
		while (true) {
			if (isElementPresent()) {
				return true;
			}

			// Putting the condition here will measure the time more accurately.
			if (System.currentTimeMillis() >= end) {
				return false;
			}
			try {
				Thread.sleep(250);
			} catch (InterruptedException e) {
			}
		}
	}
1049004
function (event) {
        if (this.hover === true) {
            this.grabOffset.set(event.gameX, event.gameY);
            this.grabOffset.sub(this.pos);
            this.selected = true;
            // don"t propagate the event furthermore
            return false;
        }
    }
486251
function (el) {
    var hoverIndex = this.hoverEls.indexOf(el)
    if (hoverIndex !== -1 &&
        this.hoverElsIntersections[hoverIndex].distance == null) {
      this.hoverEls.splice(hoverIndex, 1)
      const sect = this.hoverElsIntersections.splice(hoverIndex, 1)
      this.hoverEls.push(el)
      this.hoverElsIntersections.push(sect[0])
    }
  }
1221966
def hover_element_and_click(driver, element, click_selector,
                            click_by=By.CSS_SELECTOR,
                            timeout=settings.SMALL_TIMEOUT):
    
    start_ms = time.time() * 1000.0
    stop_ms = start_ms + (timeout * 1000.0)
    hover = ActionChains(driver).move_to_element(element)
    hover.perform()
    for x in range(int(timeout * 10)):
        try:
            element = driver.find_element(by=click_by, value=click_selector)
            element.click()
            return element
        except Exception:
            now_ms = time.time() * 1000.0
            if now_ms >= stop_ms:
                break
            time.sleep(0.1)
    raise NoSuchElementException(
        "Element {%s} was not present after %s seconds!" %
        (click_selector, timeout))
1320519
public void acceptAlert() {
        String action = "Clicking 'OK' on an alert";
        String expected = "Alert is present to be clicked";
        // wait for element to be present
        if (!is.alertPresent()) {
            waitFor.alertPresent();
        }
        if (!is.alertPresent()) {
            reporter.fail(action, expected, "Unable to click alert as it is not present");
            return; // indicates element not present
        }
        accept(action, expected, "alert");
    }
29645
public static boolean hasBackground(Element element) {

        String backgroundColor = CmsDomUtil.getCurrentStyle(element, Style.backgroundColor);
        String backgroundImage = CmsDomUtil.getCurrentStyle(element, Style.backgroundImage);
        if ((isTransparent(backgroundColor))
            && ((backgroundImage == null)
                || (backgroundImage.trim().length() == 0)
                || backgroundImage.equals(StyleValue.none.toString()))) {
            return false;
        }
        return true;
    }
657042
function(e) {
            if (this.dragCurrent) {
                clearTimeout(this.clickTimeout);

                if (this.dragThreshMet) {
                    YAHOO.log("mouseup detected - completing drag", "info", "DragDropMgr");
                    if (this.fromTimeout) {
                        YAHOO.log('fromTimeout is true (mouse didn\'t move), call handleMouseMove so we can get the dragOver event', 'info', 'DragDropMgr');
                        this.fromTimeout = false;
                        this.handleMouseMove(e);
                    }
                    this.fromTimeout = false;
                    this.fireEvents(e, true);
                } else {
                    YAHOO.log("drag threshold not met", "info", "DragDropMgr");
                }

                this.stopDrag(e);

                this.stopEvent(e);
            }
        }
619778
public void isElementVisible(By locator, boolean visible) {
		waitForLoaders();
		if (visible) {
			try {
				WebElement found = new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout())
						.until(ExpectedConditions.visibilityOfElementLocated(locator));
			} catch (WebDriverException e) {
				fail("The element " + locator.toString()
						+ " is not found or invisible where it is expected as present and visible");
			}
		} else {
			try {
				boolean invisible = new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout())
						.until(ExpectedConditions.invisibilityOfElementLocated(locator));
			} catch (WebDriverException e) {
				fail("The element " + locator.toString() + " is visible where it is expected as invisible");
			}
		}
	}
933263
def is_displayed(self):
        """"""
        # Only go into this conditional for browsers that don't use the atom themselves
        if self._w3c:
            return self.parent.execute_script(
                "return (%s).apply(null, arguments);" % isDisplayed_js,
                self)
        else:
            return self._execute(Command.IS_ELEMENT_DISPLAYED)['value']
707406
public boolean present() {
        boolean isPresent = false;
        try {
            element.getWebElement().getText();
            isPresent = true;
        } catch (NoSuchElementException | StaleElementReferenceException e) {
            log.info(e);
        }
        return isPresent;
    }
597144
public boolean checked() {
        boolean isChecked = false;
        try {
            isChecked = element.getWebElement().isSelected();
        } catch (Exception e) {
            log.info(e);
        }
        return isChecked;
    }