我试图让JMeter的在下面的XPath读预填充表单输入值:/html/body/div[1]/div[3]/div[2]/form/table/tbody/tr[2]/td/div[1]/input/@value
JMeter的XPath的提取对HTML5内容
因为我只得到错误的结果,我调查并启用整洁(宽容解析器),以及冗长(不安静;报告错误),我发现这一点:
ERROR - jmeter.util.XPathUtil: TidyException: line 65 column 9 - Error: <nav> is not recognized!
line 95 column 11 - Error: <nav> is not recognized!
InputStream: Doctype given is ""
InputStream: Document content looks like HTML 4.01 Transitional
85 warnings, 2 errors were found!
This document has errors that must be fixed before
using HTML Tidy to generate a tidied up version.
由于我们是在2017年,该文件当然是用HTML5编写和<nav>
的是一个完全有效的标签。然而泰迪却没有认识到它。我使用JMeter 3.1 r1770033运行最新的Arch Linux系统。
如何在JMeter中为HTML5网站使用XPath?
显示'HTML'为目标'input'字段 – Andersson
'<输入的ID = “title_de” class =“string optional”value =“那么这是一个强大的价值。” name =“my_element [title_de]”type =“text”>' – Kalsan
您是否尝试使用https://github.com/htacg/tidy-html5而不是当前的'Tidy'版本? – Andersson