Check that a css element is on the page, set flag to check that it isn't
439865
def is_css_in_page?(css, flag=true)
      if flag
        assert page.has_css?("#{css}"), "Error: #{css} not found on page !"
      else
        assert !page.has_css?("#{css}"), "Error: #{css} found on page !"
      end
    end
514448
function checkShow(){
  /**
   * Checks visibility of an element on a page in a browser
   * @param {HTMLElement} element some DOM node
   * @private
   * @return {boolean}
   */
  function isVisible(element){
    if (getComputedStyle(element, 'visibility') != 'visible')
      return false;

    var box = getBoundingRect(element);

    if (!box.width || !box.height)
      return false;

    return true;
  }

  var list = getSelectorList(SHOW_EVENT);

  for (var i = 0; i < list.length; i++)
  {
    var selector = list[i];
    var elements = document.querySelectorAll(getCssSelectorFromPath(selector.selector, true));
    var visibleElement = basis.array.search(basis.array(elements), true, isVisible);
    var visible = Boolean(visibleElement);
    var state;

    if (!hasOwnProperty.call(list.visible, selector.selectorStr))
      state = list.visible[selector.selectorStr] = false;
    else
      state = list.visible[selector.selectorStr];

    list.visible[selector.selectorStr] = visible;

    if (state == false && visible)
      track({
        type: 'ui',
        path: stringifyPath(getPathByNode(visibleElement)),
        selector: selector.selectorStr,
        event: SHOW_EVENT,
        data: selector.data
      });
  }
}
762925
function () {
                if (this._hasPlaceholder) {
                    var element = this._domElt;
                    var cssClass = new aria.utils.ClassList(element);
                    element.value = "";
                    this._hasPlaceholder = false;
                    cssClass.remove('placeholder');
                    cssClass.$dispose();
                    this._domElt.unselectable = "off";
                }
            }
1246680
function checkBrowser () {
        if (cordova.platformId === 'browser' && require('./isChrome')()) { // eslint-disable-line no-undef
            module.exports = window.requestFileSystem || window.webkitRequestFileSystem;
            return true;
        }
        return false;
    }
100175
function( bool ){
                $( document )[ bool ? "off" : "on" ]("selectstart", drag.dontstart )
                    .css("MozUserSelect", bool ? "" : "none" );
                // .attr("unselectable", bool ? "off" : "on" )
                document.unselectable = bool ? "off" : "on";
            }
575865
function isIndentationElement(node) {
	if (!isHtmlElement(node)) {
		return false;
	}

	if (node.tagName == "BLOCKQUOTE") {
		return true;
	}

	if (node.tagName != "DIV") {
		return false;
	}

	for (var i = 0; i < node.style.length; i++) {
		// Approximate check
		if (/^(-[a-z]+-)?margin/.test(node.style[i])) {
			return true;
		}
	}

	return false;
}
1173741
function checkPageViewsCriteria() {

    // don't bother if another box is currently open
    if( isAnyBoxVisible() ) {
        return;
    }

    boxes.forEach(function(box) {
        if( ! box.mayAutoShow() ) {
            return;
        }

        if( box.config.trigger.method === 'pageviews' && pageViews >= box.config.trigger.value ) {
            box.trigger();
        }
    });
}
368189
function isValidSelector(value) {
    "use strict";
    if (isString(value)) {
        try {
            // phantomjs env has a working document object, let's use it
            document.querySelector(value);
        } catch(e) {
            if ('name' in e && (e.name === 'SYNTAX_ERR' || e.name === 'SyntaxError')) {
                return false;
            }
        }
        return true;
    } else if (isObject(value)) {
        if (!value.hasOwnProperty('type')) {
            return false;
        }
        if (!value.hasOwnProperty('path')) {
            return false;
        }
        if (['css', 'xpath'].indexOf(value.type) === -1) {
            return false;
        }
        return true;
    }
    return false;
}
884830
def element_width_should_be(self, locator, expected):
		""""""

		self._info("Verifying element '%s' width is '%s'" % (locator, expected))
		self._check_element_size(locator, 'width', expected)
681190
def check_no_element_by_selector(self, selector):
    """"""
    elems = find_elements_by_jquery(world.browser, selector)
    if elems:
        raise AssertionError("Expected no matching elements, found {}.".format(
            len(elems)))
992617
def is_selected_by_selector(self, selector):
    """"""
    elem = find_element_by_jquery(world.browser, selector)
    if not elem.is_selected():
        raise AssertionError("Element expected to be selected.")
1169074
function checkElement(node, attr, includeScope) {
  var elements = getElements(node, attr);

  if (includeScope && node.hasAttribute(attr)) {
    elements.push(node);
  }

  return elements;
}
304555
function(ast, offset) {
			var found = null;
			 CssVisitor.visit(ast, {
	            visitNode: function(node) {
					if(node.range[0] <= offset) {
						if (node.range[1] === -1 || node.range[1] >= offset) {
							found = node;
						} else {
							return Visitor.SKIP;
						}
					} else {
					    return Visitor.BREAK;
					}      
	            },
	            endVisitNode: function(node) {
	            }
	        });
	        return found;
		}
1064331
def iselect(self, tag, limit=0):
        """"""

        for el in CSSMatch(self.selectors, tag, self.namespaces, self.flags).select(limit):
            yield el
1374053
def delayed_assert_element(self, selector, by=By.CSS_SELECTOR,
                               timeout=settings.MINI_TIMEOUT):
        
        self.__delayed_assert_count += 1
        try:
            url = self.get_current_url()
            if url == self.__last_url_of_delayed_assert:
                timeout = 1
            else:
                self.__last_url_of_delayed_assert = url
        except Exception:
            pass
        try:
            self.wait_for_element_visible(selector, by=by, timeout=timeout)
            return True
        except Exception:
            self.__add_delayed_assert_failure()
            return False
46358
function handleBooleanAttribute(element, name, flag) {
	if (flag)
		element.setAttribute(name, name);
	else
		element.removeAttribute(name);
}
197129
function (page) {
            var index = util.clamp(page - 1, 0, this.numPages),
                $precedingPage,
                $currentPage;

            paged.setCurrentPage.call(this, page);

            // update CSS classes
            this.$doc.find('.' + CSS_CLASS_PRECEDING_PAGE)
                .removeClass(CSS_CLASS_PRECEDING_PAGE);

            $precedingPage = this.$doc.find('.' + CSS_CLASS_CURRENT_PAGE);
            $currentPage = this.$pages.eq(index);

            if ($precedingPage[0] !== $currentPage[0]) {
                $precedingPage
                    .addClass(CSS_CLASS_PRECEDING_PAGE)
                    .removeClass(CSS_CLASS_CURRENT_PAGE);
                $currentPage.addClass(CSS_CLASS_CURRENT_PAGE);
            }

            this.updateVisiblePages(true);
            this.updatePageClasses(index);
        }