0

我想从 Div 标签中获取 OTP 值(123456),因为它每次都在变化。
我如何在 Jmeter 中做到这一点?我有一些想法,它可以通过xpath 提取器和调节器表达式来完成..但在 dong 中没有成功所以..请帮助我。代码示例是这样的。

<div id="messages">
<div class="section clearfix"> 
<div class="messages status"> 
<h2 class="element-invisible">Status message</h2> OTP has been sent to your registered email id.  OTP is 123456</div></div></div>


I want OTP value in a variable...so that i can use that dynamically.
4

1 回答 1

1

Use Regular expression extractor as a post processor like,

enter image description here

Later you can use that value anywhere using ${OTP_val} variable

于 2014-11-07T08:21:20.453 回答