Пример #1
0
        public IEnumerable <IWebElement> FindElements(string locator)
        {
            if (string.IsNullOrWhiteSpace(locator))
            {
                throw new ArgumentNullException("locator");
            }

            var by       = ElementLocator.Parse(locator);
            var elements = this.Driver.FindElements(by);

            return(elements);
        }
Пример #2
0
        public IWebElement FindElement(string locator)
        {
            if (string.IsNullOrWhiteSpace(locator))
            {
                throw new ArgumentNullException("locator");
            }

            var by      = ElementLocator.Parse(locator);
            var element = this.Driver.FindElement(by);

            var remoteElement = element as RemoteWebElement;

            if (null != remoteElement)
            {
                var scrollIntoView = remoteElement.LocationOnScreenOnceScrolledIntoView;
            }

            this.HighlightElement(element);

            return(element);
        }