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();
Ejemplo n.º 3
0
 IReadOnlyCollection <IWebElement> INative.FindElements(Locators.By by, string locator) => DriverFactory.GetDriver.FindElements(new Locator(by, locator).ToSeleniumLocator());
Ejemplo n.º 4
0
 IWebElement INative.FindElement(Locators.By by, string locator, int index) => DriverFactory.GetDriver.FindElement(new Locator(by, locator).ToSeleniumLocator());
Ejemplo n.º 5
0
 public IEnumerable <T> FindAll <T>(Locators.By by, string locator) where T : IElement, new() => WebElementsCollectionFactory.Create <T>(this, new Locator(by, locator));
Ejemplo n.º 6
0
 public T Find <T>(Locators.By by, string locator) where T : IElement, new() => WebElementFactory.Create <T>(this, new Locator(by, locator));