xpath
xpath copied to clipboard
xpath error
(//span[@class='tw-user-nav-list-count']/text())[2] xpath. the result is null. chrome check it. result is exist. test.zip
change to //span[@class='tw-user-nav-list-count'][2]/text()
text() function will return text node on the antch's xpath library. you should return Node object and then call text().
By the way, I found your xpath expression had a problem: [@Class='tw-user-nav-list-count']. You should change Class='' to the lower-letters class='', XPath library is case sensitivity for the query expression, your HTML page uses class lower-letters not Class first uppercase.
@zhengchun Class is auto transformed by System! I know how to correct it. I only tell you that is different to chrome xpath.

I think the logic implemented by xpath is not perfect.
Okay, I got that what your mean. I flag this.