public void Click() { if (LastFoundElement == null) { throw new Exception("No <LastFoundElement> to Click"); } LastFoundElement.Click(); }
public void Submit() { if (LastFoundElement == null) { throw new Exception("No <LastFoundElement> to Submit"); } LastFoundElement.Submit(); }
public void TypeIntoBox(string searchTerm) { if (LastFoundElement == null) { throw new Exception("No <LastFoundElement> to TypeIntoBox"); } LastFoundElement.SendKeys(searchTerm); }
public void LocateSubElements(By idToFind, string elementName) { if (LastFoundElement == null) { throw new Exception("No <LastFoundElement> to LocateSubElement"); } var elements = LastFoundElement.FindElements(idToFind); if (elements.Count == 0) { throw new Exception("Not Found: " + elementName); } LastFoundCollectionOfElements = elements; LastFoundElement = LastFoundCollectionOfElements[0]; }