<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/Modules/Search/Search.aspx?code=ddaed8994a56a0a655976eb64946e861b2d5a5e391d1b62f83e19b3f6b224db4&scope=openid%20api1&state=8048c94b1f804d379fc295732852fdd6&session_state=AI9280sswK6JzNkTRH5pz-sk3aci7S16KuYoiEyzhF0.737be1ce76d0c83a60b3c2c06a45564c&ClientId=webform&AspxAutoDetectCookieSupport=1">here</a>.</h2>
</body></html>在上面的html响应中,我如何提取代码、作用域、session_state值。这些值本质上是动态的。谁能帮帮我。我在下面尝试过: a:contain(code)/a:containsOwn(code)/ ahref*='code‘使用上面的技巧在这里只给出结果。
发布于 2021-06-23 13:57:10
我不认为你可以使用CSS Selector Extractor来提取href attribute的一部分,你只能得到完整的值,而且你的语法是不正确的,更多细节见CSS Selector Reference文章。
我更倾向于使用Boundary Extractor,它基本上提取了“左”和“右”边界之间的所有东西,所以你可以这样做:

更多信息:The Boundary Extractor vs. the Regular Expression Extractor in JMeter
https://stackoverflow.com/questions/68093805
复制相似问题