public IWebElement FindElement(Locators.By by, string locator, int index) { if (CollectionRequiresReInitialization(_nativeElements, index)) { InitCollection(); } if (IndexOutOfRange(_nativeElements, index)) { throw new IndexOutOfRangeException($"Collection does not contain element with index {index}"); } return(_nativeElements[index]); }
public IReadOnlyCollection <IWebElement> FindElements(Locators.By by, string locator) => throw new NotImplementedException();
IReadOnlyCollection <IWebElement> INative.FindElements(Locators.By by, string locator) => DriverFactory.GetDriver.FindElements(new Locator(by, locator).ToSeleniumLocator());
IWebElement INative.FindElement(Locators.By by, string locator, int index) => DriverFactory.GetDriver.FindElement(new Locator(by, locator).ToSeleniumLocator());
public IEnumerable <T> FindAll <T>(Locators.By by, string locator) where T : IElement, new() => WebElementsCollectionFactory.Create <T>(this, new Locator(by, locator));
public T Find <T>(Locators.By by, string locator) where T : IElement, new() => WebElementFactory.Create <T>(this, new Locator(by, locator));