goal is to find the span with the 3 classes. The code looks like this:
var engine = EngineBuilder.New().UseJint().EnableCss().Build();
await engine.OpenUrl("http://127.0.0.1:5500/Test.html");
var selector1 = engine.Document.QuerySelector(@"span.Fw\(b\)");
var selector2 = engine.Document.QuerySelector(@"span.Fw(b)");
var selector3 = engine.Document.QuerySelector(@"span.t\(0\.1\)");
var selector4 = engine.Document.QuerySelector(@".testclass");
if we evaluate the results like this
if (selector1 != null)
System.Console.WriteLine("Selector 1 pass");
if (selector2 != null)
System.Console.WriteLine("Selector 2 pass");
if (selector3 != null)
System.Console.WriteLine("Selector 3 pass");
if (selector4 != null)
System.Console.WriteLine("Selector 4 pass");
the only selector that passes is selector 4, which does not use brackets or dots.
Thank you for the detailed report. I researched this a bit and found out that the class can actually contain any character (https://stackoverflow.com/a/6732899/5301097). I'm going to fix this.
Hello, I've noticed that css selectors that have brackets or other symbols that are represented with a backslash are not found.
Consider this html
goal is to find the span with the 3 classes. The code looks like this:
if we evaluate the results like this
the only selector that passes is selector 4, which does not use brackets or dots.