在网站使用插件测试语法如下//div[@class='pages wth']/ul/li[last()-1]/a/text() 能正常返回 但是在程序里走就报错了Could not parse query 'li[last()]': unexpected token at 'last()'