If the provided argument is a valid react element or an array that contains at least
one valid react element in it
@param {*} suspectedElement
@returns {Boolean}
334604
function isReactElement(suspectedElement) {
    var isElem = false;
    if (React.isValidElement(suspectedElement)) {
        isElem = true;
    } else if (Array.isArray(suspectedElement)) {
        for (var i = 0, l = suspectedElement.length; i < l; i++) {
            if (React.isValidElement(suspectedElement[i])) {
                isElem = true;
                break;
            }
        }
    }
    return isElem;
}
1219736
function (array, searchElement) {
    for (var i = 0, len = array.length; i < len; i++) {
      if (array[i] === searchElement) {
        return i;
      }
    }
    return -1;
  }
1329007
function debugDeepElementOrInstance(
  instance: React.Element<any> | ?ReactTestRendererJSON,
  message?: any = ''
) {
  try {
    // We're assuming React.Element<any> here and fallback to
    // rendering ?ReactTestRendererJSON
    // $FlowFixMe
    const { toJSON } = render(instance);
    if (message) {
      console.log(`${message}\n\n`, format(toJSON()));
    } else {
      console.log(format(toJSON()));
    }
  } catch (e) {
    // $FlowFixMe
    debugDeep(instance);
  }
}
895911
function check(node) {
            const elements = node.elements;
            const normalizedOptions = normalizeOptions(context.options[0]);
            const options = normalizedOptions[node.type];

            let elementBreak = false;

            /*
             * MULTILINE: true
             * loop through every element and check
             * if at least one element has linebreaks inside
             * this ensures that following is not valid (due to elements are on the same line):
             *
             * [
             *      1,
             *      2,
             *      3
             * ]
             */
            if (options.multiline) {
                elementBreak = elements
                    .filter(element => element !== null)
                    .some(element => element.loc.start.line !== element.loc.end.line);
            }

            const linebreaksCount = node.elements.map((element, i) => {
                const previousElement = elements[i - 1];

                if (i === 0 || element === null || previousElement === null) {
                    return false;
                }

                const commaToken = sourceCode.getFirstTokenBetween(previousElement, element, astUtils.isCommaToken);
                const lastTokenOfPreviousElement = sourceCode.getTokenBefore(commaToken);
                const firstTokenOfCurrentElement = sourceCode.getTokenAfter(commaToken);

                return !astUtils.isTokenOnSameLine(lastTokenOfPreviousElement, firstTokenOfCurrentElement);
            }).filter(isBreak => isBreak === true).length;

            const needsLinebreaks = (
                elements.length >= options.minItems ||
                (
                    options.multiline &&
                    elementBreak
                ) ||
                (
                    options.consistent &&
                    linebreaksCount > 0 &&
                    linebreaksCount < node.elements.length
                )
            );

            elements.forEach((element, i) => {
                const previousElement = elements[i - 1];

                if (i === 0 || element === null || previousElement === null) {
                    return;
                }

                const commaToken = sourceCode.getFirstTokenBetween(previousElement, element, astUtils.isCommaToken);
                const lastTokenOfPreviousElement = sourceCode.getTokenBefore(commaToken);
                const firstTokenOfCurrentElement = sourceCode.getTokenAfter(commaToken);

                if (needsLinebreaks) {
                    if (astUtils.isTokenOnSameLine(lastTokenOfPreviousElement, firstTokenOfCurrentElement)) {
                        reportRequiredLineBreak(firstTokenOfCurrentElement);
                    }
                } else {
                    if (!astUtils.isTokenOnSameLine(lastTokenOfPreviousElement, firstTokenOfCurrentElement)) {
                        reportNoLineBreak(firstTokenOfCurrentElement);
                    }
                }
            });
        }
638616
def verify_element_present(self, locator, msg=None):
        
        try:
            self.asset_element_present(locator, msg)
        except AssertionError, e:
            if msg:
                m = "%s:\n%s" % (msg, str(e))
            else:
                m = str(e)
            self.verification_erorrs.append(m)
1115352
function selectorValidateAndParse(selectorRaw_) {
    const selectorRaw = selectorRaw_.trim();
    const bracketOpenPos = selectorRaw.indexOf('[');
    const bracketClosePos = selectorRaw.indexOf(']');

    let indexStr;
    let name = selectorRaw;

    // Slice selectorRaw to extract name and indexStr if submitted.
    if (bracketOpenPos > -1) {
      if (bracketClosePos === selectorRaw.length - 1) {
        indexStr = selectorRaw.slice(bracketOpenPos + 1, bracketClosePos);
        name = selectorRaw.slice(0, bracketOpenPos);
      }
      else {
        return null;
      }
    }

    // Validate that name is a css selector.
    // eslint-disable-next-line no-useless-escape
    if (!/^(#|\.)?[_a-z][\w#\-\.]*$/i.test(name)) {
      return null;
    }

    // If indexStr if submitted, validate it is an integer.
    if (indexStr) {
      if (!/^\d+$/.test(indexStr)) {
        return null;
      }
    }

    return name;
  }
1178051
function isActiveElement(elmn) {
				var result = false;
				try {
					result = elmn === document.activeElement;
				} catch (error) {}
				return result;
			}
173717
function ensure_element_id(element) {
        if (!element.id || element.id === '') {
          element.id = config.generate_random_id('ac_element');
          return true;
        }
        return false;
      }
343926
function isSafeIntegerArray( value ) {
	var len, i;
	if ( !isArray( value ) ) {
		return false;
	}
	len = value.length;
	if ( !len ) {
		return false;
	}
	for ( i = 0; i < len; i++ ) {
		if ( !isSafeInteger( value[i] ) ) {
			return false;
		}
	}
	return true;
}
592120
function selectorExists(sel) {
  utils.assertString(sel, 'selector');

  if (!this.__selectorsMap__) {
    var Normalizer = require('../visitor/normalizer')
      , visitor = new Normalizer(this.root.clone());
    visitor.visit(visitor.root);

    this.__selectorsMap__ = visitor.map;
  }

  return sel.string in this.__selectorsMap__;
}
1069146
function contains(array, item) {
  if (array && array.length && item) {
    return array.indexOf(item) !== -1;
  }
  return false;
}
435663
function getNearestTypeElement(element) {
		var found = false;
		var moduleBoundaryReached = false;

		// We need to check for the existence of 'element' since occasionally we call this on a detached element node.
		// For example:
		//  1. event handlers like mouseout may sometimes detach nodes from the DOM
		//  2. event handlers like mouseleave will still fire on the detached node
		// Checking existence of element.parentNode ensures the element is a valid HTML Element
		while (!found && element && element.parentNode && !moduleBoundaryReached) {
			found = isTypeElement(element);
			moduleBoundaryReached = isModuleElement(element);

			if (!found) {
				element = element.parentNode;
			}

		}

		return found ? element : null;
	}
719976
function checkComponents (options) {
  for (const key in options.components) {
    const lower = key.toLowerCase()
    if (isBuiltInTag(lower) || config.isReservedTag(lower)) {
      warn(
        'Do not use built-in or reserved HTML elements as component ' +
                'id: ' + key
      )
    }
  }
}
687564
function verify(node, pattern, flags) {
            const patternNode = parser.parsePattern(
                pattern,
                0,
                pattern.length,
                flags.includes("u")
            );
            const has = {
                surrogatePairWithoutUFlag: false,
                combiningClass: false,
                variationSelector: false,
                emojiModifier: false,
                regionalIndicatorSymbol: false,
                zwj: false
            };

            visitRegExpAST(patternNode, {
                onCharacterClassEnter(ccNode) {
                    for (const chars of iterateCharacterSequence(ccNode.elements)) {
                        for (const kind of kinds) {
                            has[kind] = has[kind] || hasCharacterSequence[kind](chars);
                        }
                    }
                }
            });

            for (const kind of kinds) {
                if (has[kind]) {
                    context.report({ node, messageId: kind });
                }
            }
        }
612941
function checkComponentDefined (el, name) {
  // Check if element contains the component.
  if (el.components[name] && el.components[name].attrValue) { return true; }

  return isComponentMixedIn(name, el.mixinEls);
}
45854
function buildElementIdentifier(element) {
			if (element.id) {
				return `#${element.id}`;
			}
			let identifier = element.tagName.toLowerCase();
			if (!element.parentNode) {
				return identifier;
			}
			const siblings = getSiblings(element);
			const childIndex = siblings.indexOf(element);
			if (!isOnlySiblingOfType(element, siblings) && childIndex !== -1) {
				identifier += `:nth-child(${childIndex + 1})`;
			}
			return identifier;
		}
1354322
function validateFragmentProps(fragment) {
  currentlyValidatingElement = fragment;

  var keys = Object.keys(fragment.props);
  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    if (!VALID_FRAGMENT_PROPS.has(key)) {
      warning(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.%s', key, getStackAddendum());
      break;
    }
  }

  if (fragment.ref !== null) {
    warning(false, 'Invalid attribute `ref` supplied to `React.Fragment`.%s', getStackAddendum());
  }

  currentlyValidatingElement = null;
}