FindElementByXPath() public method

Finds the first of elements that match the XPath supplied
public FindElementByXPath ( string xpath ) : IWebElement
xpath string xpath to the element
return IWebElement
Exemplo n.º 1
0
        protected IWebElement FindElement(RemoteWebDriver webDriver, Selector element)
        {
            switch (element.Type)
            {

                case ExtractType.XPath:
                    {
                        return webDriver.FindElementByXPath(element.Expression);
                    }
                case ExtractType.Css:
                    {
                        return webDriver.FindElementByCssSelector(element.Expression);
                    }
            }
            throw new SpiderExceptoin("Unsport findy: " + element.Type);
        }