public string FindElement(WiniumElement root, By strategy) { var element = root.IterFind(TreeScope.Descendants, strategy.Predicate).FirstOrDefault(); if (element == null) { throw new AutomationException("Element could not be found.", ResponseStatus.NoSuchElement); } return this.RegisterElement(element); }
public List<string> FindElements(string rootRegisteredId, By strategy) { var parent = this.GetRegistredElement(rootRegisteredId); return this.FindElements(parent, strategy); }
public List<string> FindElements(WiniumElement root, By strategy) { var elements = root.IterFind(TreeScope.Descendants, strategy.Predicate); return elements.Select(this.RegisterElement).ToList(); }