コード例 #1
0
 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]);
 }
コード例 #2
0
 public IReadOnlyCollection <IWebElement> FindElements(Locators.By by, string locator) => throw new NotImplementedException();
コード例 #3
0
 IReadOnlyCollection <IWebElement> INative.FindElements(Locators.By by, string locator) => DriverFactory.GetDriver.FindElements(new Locator(by, locator).ToSeleniumLocator());
コード例 #4
0
 IWebElement INative.FindElement(Locators.By by, string locator, int index) => DriverFactory.GetDriver.FindElement(new Locator(by, locator).ToSeleniumLocator());
コード例 #5
0
 public IEnumerable <T> FindAll <T>(Locators.By by, string locator) where T : IElement, new() => WebElementsCollectionFactory.Create <T>(this, new Locator(by, locator));
コード例 #6
0
 public T Find <T>(Locators.By by, string locator) where T : IElement, new() => WebElementFactory.Create <T>(this, new Locator(by, locator));