Jmeter:Xpath,用于获取不超过一定字符数的文本

Jmeter:Xpath,用于获取不超过一定字符数的文本,jmeter,Jmeter,从下面的代码片段中,我想获取标题作为我的状态报告(ABCDEFGH12160916) 我的html中有数千个标题。 //td[@class=“dealertitle”]//text()--我明白了 我的状态报告(ABCDEFGH12160916) *实时、计费、客户关系管理* I have also tried //td[@class="dealertitle"]//text()//substring-before(text(),')')---

从下面的代码片段中,我想获取标题作为我的状态报告(ABCDEFGH12160916) 我的html中有数千个标题。 //td[@class=“dealertitle”]//text()--我明白了 我的状态报告(ABCDEFGH12160916) *实时、计费、客户关系管理*

 I have also tried 
//td[@class="dealertitle"]//text()//substring-before(text(),')')---                                                                                                             

Jmeter does not allow me to use substring-before. It says unknown node type
 substring-before

 Can someone please help me. 
 I want to get this text till the end - My status   Report   (ABCDEFGH12160916)

            <html>
            <head>
           <body>
          <table class="secondhead" width="100%" cellspacing="0" cellpadding="0">
           <tbody>
           <tr>
            <td class="title">
            My status Report (ABCDEFGH12160916)
            <span style="font-size:14pt;color:#00FF00"> * Live, Billable, CRM *                                                                          
           </span>
           </td>
           </tr>
           </tbody>
          </table>
          </body>
          </head>
          </html>
我也试过了
//td[@class=“dealertitle”]//text()//前面的子字符串(text(),'))--
Jmeter以前不允许我使用子字符串。它表示未知节点类型
前子串
谁能帮帮我吗。
我想把这篇文章一直写到最后——我的状态报告(ABCDEFGH12160916)
我的状态报告(ABCDEFGH12160916)
*实时、计费、客户关系管理*

//td[@class=“dealertitle”]///text()[1]

在XPath查询中有一个额外的
/

您的查询:

 //td[@class="dealertitle"]//text()
正确的查询:

//td[@class="dealertitle"]/text()
演示:

说明:根据

/
从根节点选择

/
从当前节点中选择与所选内容匹配的节点,无论它们位于何处


有关在JMeter测试中使用XPath进行相关性的更多详细信息,请参阅指南

//td[@class=“dealertitle”]//text()[1]谢谢这一个有效了://td[@class=“dealertitle”]/text()Dmitri-你能告诉我如何删除文本中的空格吗?我想删除此文本中的多余空格。开始和结束处的空格-我的状态报告(ABCDEFGH12160916)//td[@class=“title”]/text()/规范化空格(.)--此项在JMeter中不起作用。规范化空间是未知节点。非常感谢您的帮助
规范化空间(//td[@class=“title”]/text())