Exemplo n.º 1
0
        public override TElement Find <TByStrategy, TElement>(string value)
        {
            var byStrategy    = (TByStrategy)Activator.CreateInstance(typeof(TByStrategy), value);
            var nativeElement = _nativeElementFinderService.Find(byStrategy);

            return(new WebElement(_webDriver, nativeElement, byStrategy.Convert()) as TElement);
        }
Exemplo n.º 2
0
        protected IWebElement FindElement(ISearchContext searchContext, By by)
        {
            var nativeElementFinder = new NativeElementFinderService(searchContext);
            var element             = nativeElementFinder.Find(by);

            return(element);
        }
Exemplo n.º 3
0
        protected IWebElement FindElement <TBy>(ISearchContext searchContext, TBy by)
            where TBy : FindStrategy
        {
            var nativeElementFinder = new NativeElementFinderService(searchContext);
            var element             = nativeElementFinder.Find(by);

            return(element);
        }
        public override Element FindByClass(string cssClass)
        {
            var byStrategy    = new ByClassStrategy(cssClass);
            var nativeElement = _nativeElementFinderService.Find(byStrategy);

            return(new WebElement(_webDriver, nativeElement, byStrategy.Convert()));
        }