private static bool VerifyIsSingleElementPresent(string elementId, ReadOnlyCollection<IWebElement> elements) { if (elements.Count > 1) { throw new MultipleMatchingElementsException(string.Format("More than one matching element found with id '{0}'.", elementId)); } return elements.Count == 1; }