private void VerifyCssSelector(string selector, Semantic.LineInfo lineInfo)
        {
            if (string.IsNullOrEmpty(selector))
            {
                return;
            }

            HtmlDoc doc   = Config.DomFactory.Create();
            bool    valid = doc.ValidateCss(selector);

            if (!valid)
            {
                Errors.Add(new BadCssSelector(selector, lineInfo));
            }
        }
        private void VerifyCssSelector(string selector, Semantic.LineInfo lineInfo)
        {
            if (string.IsNullOrEmpty(selector))
            {
                return;
            }

            HtmlDocument doc = new HtmlDocument();

            doc.LoadHtml("<html></html>");
            try
            {
                doc.DocumentNode.QuerySelector(selector);
            }
            catch (Exception e)
            {
                Errors.Add(new BadCssSelector(e.Message, lineInfo));
            }
        }