Beispiel #1
0
        /// <summary>
        /// 通过Css 选择器查找元素, 并取得属性的值
        /// </summary>
        /// <param name="css">Css 选择器</param>
        /// <param name="attrName">查询到的元素的属性</param>
        /// <returns>查询接口</returns>
        public override ISelectable Css(string css, string attrName)
        {
            var cssSelector = Selectors.Css(css, attrName);

            return(Select(cssSelector));
        }
Beispiel #2
0
 /// <summary>
 /// 通过Css 选择器查找结果
 /// </summary>
 /// <param name="css">Css 选择器</param>
 /// <returns>查询接口</returns>
 public override ISelectable Css(string css)
 {
     return(Select(Selectors.Css(css)));
 }
Beispiel #3
0
 public ISelectable Regex(string regex, int group)
 {
     return(Select(Selectors.Regex(regex, group)));
 }
Beispiel #4
0
 /// <summary>
 /// 通过XPath查找结果
 /// </summary>
 /// <param name="xpath">XPath 表达式</param>
 /// <returns>查询接口</returns>
 public override ISelectable XPath(string xpath)
 {
     return(SelectList(Selectors.XPath(xpath)));
 }
Beispiel #5
0
 public ISelectable Regex(string regex)
 {
     return(Select(Selectors.Regex(regex)));
 }