问题
I want to fetch OTP value(123456) from Div tag, as it changes every time.
How can i do this in Jmeter?
I have some idea that, it can done by xpath extractor & reguler expression..but doesn't successful in dong so.. Please help me.
Code Sample is like this.
<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.
回答1:
Use Regular expression extractor as a post processor like,
Later you can use that value anywhere using ${OTP_val} variable
来源:https://stackoverflow.com/questions/26796222/how-to-fetch-or-extract-value-from-div-tag-using-jmeter