Ejemplo n.º 1
0
 public static ISelector GetSelector(ExtractBy extractBy)
 {
     string value = extractBy.Value;
     ISelector selector;
     switch (extractBy.Type)
     {
         case ExtractBy.ExtracType.Css:
             selector = new CssSelector(value);
             break;
         case ExtractBy.ExtracType.Regex:
             selector = new RegexSelector(value);
             break;
         case ExtractBy.ExtracType.XPath:
             selector = GetXpathSelector(value);
             break;
         case ExtractBy.ExtracType.JsonPath:
             selector = new JsonPathSelector(value);
             break;
         case ExtractBy.ExtracType.Enviroment:
             selector = new EnviromentSelector(value);
             break;
         default:
             selector = GetXpathSelector(value);
             break;
     }
     return selector;
 }
Ejemplo n.º 2
0
        public override ISelectable Css(string selector, string attrName)
        {
            CssSelector cssSelector = Selectors.Css(selector, attrName);

            return(Select(cssSelector));
        }
Ejemplo n.º 3
0
        public override ISelectable Css(string selector)
        {
            CssSelector cssSelector = Selectors.Css(selector);

            return(Select(cssSelector));
        }