/// <summary> /// Checks if element is present in DOM. /// </summary> /// <param name="element">Instance of NetSelElement.</param> /// <returns>True if present, otherwise false.</returns> private static bool IsElementPresent(NetSelElement element) { try { return(element.TagName != null); } catch (Exception) { return(false); } }
/// <summary> /// Method to create new instance of Wait. /// </summary> /// <param name="elem">Instance of NetSelElement.</param> /// <param name="timeoutTime">Time interval.</param> /// <returns>Instance of Wait.</returns> public static Wait <ICollection <NetSelElement> > WaitFor(this NetSelElement elem, TimeSpan timeoutTime) { return(WaitFor(new[] { elem }, timeoutTime)); }